Skip to content

Commit

Permalink
fix(lsp): silent error on inlayhints not executed properly in 0.9 add…
Browse files Browse the repository at this point in the history
…ed check

Signed-off-by: Daniel Nehrig <[email protected]>
  • Loading branch information
danielnehrig committed Oct 20, 2023
1 parent 445b046 commit 1070281
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
1 change: 0 additions & 1 deletion lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
"live-server.nvim": { "branch": "main", "commit": "8cae0641cabe8c555311f09dbb0ae36a513a9d5c" },
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
"lsp-lens.nvim": { "branch": "main", "commit": "296e0d33dddba1a1de9b69143f189cb994111c5a" },
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
Expand Down
13 changes: 7 additions & 6 deletions lua/config/plugins/configs/lspconfig/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ function LSP.on_attach(client, bufnr)
lsp_status.on_attach(client)
end
-- client.server_capabilities.semanticTokensProvider = nil

require("config.core.mappings").set_lsp_mapping(bufnr)
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint(bufnr, true)
end

fn.sign_define(
"DiagnosticSignError",
{ texthl = "DiagnosticError", text = "" }
Expand All @@ -33,6 +27,13 @@ function LSP.on_attach(client, bufnr)
"DiagnosticSignHint",
{ texthl = "DiagnosticHint", text = "" }
)

require("config.core.mappings").set_lsp_mapping(bufnr)
if vim.version().minor > 9 then
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint(bufnr, true)
end
end
end

-- LSP Settings
Expand Down
11 changes: 0 additions & 11 deletions lua/config/plugins/modules/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@ M.lsp = {
})
end,
},
--- INFO: Highlight colors for diagnostic and signs
["folke/lsp-colors.nvim"] = {
config = function()
require("lsp-colors").setup({
Error = "#db4b4b",
Warning = "#e0af68",
Information = "#0db9d7",
Hint = "#10B981",
})
end,
},
--- INFO: lua server setup for nvim
["folke/neodev.nvim"] = {
ft = "lua",
Expand Down
2 changes: 1 addition & 1 deletion lua/config/plugins/modules/utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ M.utility = {
["folke/todo-comments.nvim"] = {
config = require("config.plugins.configs.todo").init,
dependencies = "telescope.nvim",
lazy = true,
event = "VeryLazy",
},
-- INFO: surround () motion
["ur4ltz/surround.nvim"] = {
Expand Down

0 comments on commit 1070281

Please sign in to comment.