🚨 error(nvim): disable by now onlay-hints because of new nightly update

This commit is contained in:
Sergio Laín 2023-11-20 00:29:40 +01:00
parent f79d87dc15
commit d56833bcef
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -44,33 +44,33 @@ return {
keys[#keys + 1] = { "<leader>clr", "<cmd>LspRestart<cr>", desc = "Restart Lsp" }
keys[#keys + 1] = { "<leader>cls", "<cmd>LspStart<cr>", desc = "Start Lsp" }
keys[#keys + 1] = { "<leader>clS", "<cmd>LspStop<cr>", desc = "Stop Lsp" }
require("lazyvim.util").lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/documentSymbol") then
-- Enable inlay hints if the client supports it.
if client.server_capabilities.inlayHintProvider then
local inlay_hints_group = vim.api.nvim_create_augroup("InlayHints", { clear = true })
-- Initial inlay hint display.
local mode = vim.api.nvim_get_mode().mode
vim.lsp.inlay_hint(buffer, mode == "n" or mode == "v")
vim.api.nvim_create_autocmd("InsertEnter", {
group = inlay_hints_group,
buffer = buffer,
callback = function()
vim.lsp.inlay_hint(buffer, false)
end,
})
vim.api.nvim_create_autocmd("InsertLeave", {
group = inlay_hints_group,
buffer = buffer,
callback = function()
vim.lsp.inlay_hint(buffer, true)
end,
})
end
end
end)
-- require("lazyvim.util").lsp.on_attach(function(client, buffer)
-- if client.supports_method("textDocument/documentSymbol") then
-- -- Enable inlay hints if the client supports it.
-- if client.server_capabilities.inlayHintProvider then
-- local inlay_hints_group = vim.api.nvim_create_augroup("InlayHints", { clear = true })
--
-- -- Initial inlay hint display.
-- local mode = vim.api.nvim_get_mode().mode
-- vim.lsp.inlay_hint(buffer, mode == "n" or mode == "v")
--
-- vim.api.nvim_create_autocmd("InsertEnter", {
-- group = inlay_hints_group,
-- buffer = buffer,
-- callback = function()
-- vim.lsp.inlay_hint(buffer, false)
-- end,
-- })
-- vim.api.nvim_create_autocmd("InsertLeave", {
-- group = inlay_hints_group,
-- buffer = buffer,
-- callback = function()
-- vim.lsp.inlay_hint(buffer, true)
-- end,
-- })
-- end
-- end
-- end)
end,
opts = {
-- options for vim.diagnostic.config()
@ -91,7 +91,7 @@ return {
},
},
inlay_hints = {
enabled = true,
enabled = false,
},
servers = {
lua_ls = {