diff options
| author | jyn <github@jyn.dev> | 2025-02-06 10:06:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-06 07:06:15 -0800 |
| commit | 7c284f44fe7b120cf1e5b63d2b0648c3831c4048 (patch) | |
| tree | 352a3fb727b6d5888c35b7e66c73440b71ddb0fb /lua/lspconfig/configs/lua_ls.lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-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.
Diffstat (limited to 'lua/lspconfig/configs/lua_ls.lua')
| -rw-r--r-- | lua/lspconfig/configs/lua_ls.lua | 2 |
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 |
