lua-language-server
lua-language-server copied to clipboard
`runtime.version` isn't applied from `.luarc.json`
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Completion
Expected Behaviour
It should look up definitions for LuaJIT (Lua 5.1).
Actual Behaviour
It looks up definitions for Lua 5.4.
Reproduction steps
- Having the following
.luarc.jsonin a project:
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics": {
"globals": [ "after_each", "before_each", "describe", "it", "vim" ],
"disable": [ "redefined-local" ]
},
"runtime": {
"version": "LuaJIT"
},
"workspace": {
"library": [
"$VIMRUNTIME"
],
"checkThirdParty": false
}
}
- Open Neovim and edit a
.luafile - Go to definition for any standard library function
- Notice the version of the standard library used
Additional Notes
I'm using Neovim v0.10.1 with the native LSP.
I can reproduce this with a very simple config (no settings):
lspconfig.lua_ls.setup({})
One important thing to mention is that other settings like diagnostics are properly applied.