Closed Eddio0141 closed 3 months ago
Hey 👋
I haven't encountered this with the default setup. Is this with nixd instead of nil?
It sounds like the nixd client (which I guess supports code lenses) is somehow attaching to the Lua buffer, which leads to this autocommand being created.
Hiya
This is with the default template unmodified, I directly run nix run "github:nix-community/kickstart-nix.nvim"
to open some nix file, and then a lua file which causes the error for me
A short clip here goes through exactly what I'm doing
https://github.com/user-attachments/assets/b5ac8a06-47b0-4b71-a100-6d670221ebf9
I am facing the same issue when running the flake with nix run "github:nix-community/kickstart-nix.nvim"
open nix/neovim-overlay.nix
:e ../kickstart-nix.nvim/nvim/lua/user/lsp.lua
delete a line of code
make the code look like this for example:
---@mod user.lsp
---@brief [[
---LSP related functions
---@brief ]]
---Gets a 'ClientCapabilities' object, describing the LSP client capabilities
---Extends the object with capabilities provided by plugins.
---@return lsp.ClientCapabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- Add com_nvim_lsp capabilities
local cmp_lsp = require('cmp_nvim_lsp')
local cmp_lsp_capabilities = cmp_lsp.default_capabilities()
capabilities = vim.tbl_deep_extend('keep', capabilities, cmp_lsp_capabilities)
-- Add any additional plugin capabilities here.
-- Make sure to follow the instructions provided in the plugin's docs.
return capabilities
end
return M
:thinking: just pulled the latest changes and can reproduce. ~It looks like lua-language-server is erroneously reporting that it supports code lenses to the client.~
The error I get is
method textDocument/codeLens is not supported by any of the servers registered for the current buffer
. This error pops up on anything I do, writing, escaping to normal mode, etc.How to do:
:e whatever.lua
or:Explore
, doesn't matter):w
can cause the error