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