aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2025-02-06 10:06:15 -0500
committerGitHub <noreply@github.com>2025-02-06 07:06:15 -0800
commit7c284f44fe7b120cf1e5b63d2b0648c3831c4048 (patch)
tree352a3fb727b6d5888c35b7e66c73440b71ddb0fb
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar.gz
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar.bz2
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar.lz
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar.xz
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.tar.zst
nvim-lspconfig-7c284f44fe7b120cf1e5b63d2b0648c3831c4048.zip
docs(lua_ls): don't skip VIMRUNTIME ~/.config/nvim/.luarc.json exists #3603
.luarc is created by lua-lsp itself (e.g. if you hit "disable diagnostics" in a code action), at which point the lsp will start showing errors that the vim global is undefined after the next restart.
-rw-r--r--lua/lspconfig/configs/lua_ls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/configs/lua_ls.lua b/lua/lspconfig/configs/lua_ls.lua
index abdef096..a545b34b 100644
--- a/lua/lspconfig/configs/lua_ls.lua
+++ b/lua/lspconfig/configs/lua_ls.lua
@@ -48,7 +48,7 @@ require'lspconfig'.lua_ls.setup {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
- if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
+ if path ~= vim.fn.stdpath('config') and (vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc')) then
return
end
end