diff options
| author | Kyren223 <contact@kyren.codes> | 2026-06-19 21:06:48 +0300 |
|---|---|---|
| committer | Kyren223 <contact@kyren.codes> | 2026-06-19 21:06:48 +0300 |
| commit | c5eef73c549cbc5605f62fe80668af37ced69d06 (patch) | |
| tree | 64d42fcb8bc787c290ddd41830aac35bcb1c03d4 /.config/nvim/lsp/lua_ls.lua | |
| parent | e26e1f60f88fbcc87dc8dca8e92f532ae23e614e (diff) | |
Fix lua globals not loading, I now get autocompletion for stuff like
vim, Snacks, os, tonumber etc
Diffstat (limited to '.config/nvim/lsp/lua_ls.lua')
| -rw-r--r-- | .config/nvim/lsp/lua_ls.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.config/nvim/lsp/lua_ls.lua b/.config/nvim/lsp/lua_ls.lua index 0f55a21..b3311e0 100644 --- a/.config/nvim/lsp/lua_ls.lua +++ b/.config/nvim/lsp/lua_ls.lua @@ -4,6 +4,7 @@ return { cmd = { 'lua-language-server', '--logpath=' .. vim.fn.expand('~/.cache/nvim/lua-language-server/log'), + '--metapath=' .. vim.fn.expand('~/.cache/nvim/lua-language-server/meta'), }, filetypes = { 'lua' }, root_markers = { @@ -16,4 +17,22 @@ return { 'selene.yml', '.git', }, + settings = { + Lua = { + runtime = { + -- Tell the language server you're targetting Neovim's runtime environment + version = 'LuaJIT', + -- CRITICAL: Allows modern lua_ls to parse the dynamic third-party paths + -- injected by lazydev without strict root containment rules. + pathStrict = false, + }, + workspace = { + -- Stops the server from asking to configure your workspace environment reactively + checkThirdParty = false, + }, + telemetry = { + enable = false, + }, + }, + }, } |
