Update lua config

This commit is contained in:
Alex Yatskov 2023-01-22 18:31:05 -08:00
parent 7718d83855
commit f4f67935d6
2 changed files with 18 additions and 8 deletions

View File

@ -1,4 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.workspace.checkThirdParty": false
}

View File

@ -21,13 +21,27 @@ if vim.fn.executable('typescript-language-server') then
nvim_lspconfig.tsserver.setup({capabilities = capabilities}) nvim_lspconfig.tsserver.setup({capabilities = capabilities})
end end
if vim.fn.executable('lua-language-server') then if vim.fn.executable('lua-language-server') then
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, 'lua/?.lua')
table.insert(runtime_path, 'lua/?/init.lua')
nvim_lspconfig.sumneko_lua.setup({ nvim_lspconfig.sumneko_lua.setup({
settings = { settings = {
Lua = { Lua = {
diagnostics = {globals = {'vim'}}, diagnostics = {
runtime = {version = 'LuaJIT'}, globals = {'vim'},
telemetry = {enable = false}, },
workspace = {library = vim.api.nvim_get_runtime_file('', true)}, runtime = {
path = runtime_path,
version = 'LuaJIT',
},
telemetry = {
enable = false,
},
workspace = {
checkThirdParty = false,
library = vim.api.nvim_get_runtime_file('', true),
},
}, },
}, },
}) })