Working lua-language-server configuration

This commit is contained in:
Jeremy Wall 2023-08-23 18:46:02 -04:00
parent 70c86fae96
commit ac66d2256b
3 changed files with 24 additions and 5 deletions

View File

@ -148,7 +148,7 @@ EOF";
(tlaplus.override {
adoptopenjdk-bin = jdk;
})
luajitPackages.lua-lsp
lua-language-server
jdk
plantuml-c4
texlive.combined.scheme-basic

View File

@ -103,7 +103,26 @@ lspconfig.tsserver.setup{}
lspconfig.rust_analyzer.setup{}
-- lua language server setup.
lspconfig.lua_ls.setup{}
lspconfig.lua_ls.setup{
settings = {
Lua = {
runtime = { version = 'LuaJIT', },
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
-- Disable the checkThirdParty prompts.
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
}
-- lsp configuration
vim.api.nvim_create_autocmd('LspAttach', {

6
nix/darwin/flake.lock generated
View File

@ -34,12 +34,12 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-RQLwfX1ZM8lLATzqM41ZhBnB+LRK71D3Q5nyaG3c30A=",
"path": "/nix/store/3yf62sm1x6h8bb01hxwln2sgi1czwcqy-source/nix/base-system",
"narHash": "sha256-2QL7ewPUK7h3868qChArUaSba0xvUod8J1vpaPQo+Sw=",
"path": "/nix/store/k56fbhy1997yid1h1kfksx7rmhs4gsxv-source/nix/base-system",
"type": "path"
},
"original": {
"path": "/nix/store/3yf62sm1x6h8bb01hxwln2sgi1czwcqy-source/nix/base-system",
"path": "/nix/store/k56fbhy1997yid1h1kfksx7rmhs4gsxv-source/nix/base-system",
"type": "path"
}
},