File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json" ,
3- "runtime.version" : " Lua 5.1" ,
3+ "runtime.version.luals-check-only " : " Lua 5.1" ,
44 "workspace" : {
55 "library" : [
66 " $VIMRUNTIME/lua/vim" ,
Original file line number Diff line number Diff line change @@ -9,15 +9,20 @@ if [ -z "${VIMRUNTIME}" ]; then
99 export VIMRUNTIME=" /usr/share/nvim/runtime"
1010fi
1111
12- DIR_SRC=" lua"
13- DIR_OUT=" luals-out"
12+ DIR_SRC=" ${PWD} /lua"
13+ DIR_OUT=" ${PWD} /luals-out"
14+ FILE_LUARC=" ${DIR_OUT} /luarc.json"
1415
1516# clear output
1617rm -rf " ${DIR_OUT} "
1718mkdir " ${DIR_OUT} "
1819
20+ # Uncomment runtime.version for strict neovim baseline 5.1
21+ # It is not set normally, to prevent luals loading 5.1 and 5.x, resulting in both versions being chosen on vim.lsp.buf.definition()
22+ cat " ${PWD} /.luarc.json" | sed -E ' s/.luals-check-only//g' > " ${FILE_LUARC} "
23+
1924# execute inside lua to prevent luals itself from being checked
20- OUT=$( lua-language-server --check=" ${DIR_SRC} " --configpath=" ${PWD} /.luarc.json " --checklevel=Information --logpath=" ${DIR_OUT} " --loglevel=error)
25+ OUT=$( lua-language-server --check=" ${DIR_SRC} " --configpath=" ${FILE_LUARC} " --checklevel=Information --logpath=" ${DIR_OUT} " --loglevel=error)
2126RC=$?
2227
2328echo " ${OUT} " >&2
You can’t perform that action at this time.
0 commit comments