File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"$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" ,
4
4
"workspace" : {
5
5
"library" : [
6
6
" $VIMRUNTIME/lua/vim" ,
Original file line number Diff line number Diff line change @@ -9,15 +9,20 @@ if [ -z "${VIMRUNTIME}" ]; then
9
9
export VIMRUNTIME=" /usr/share/nvim/runtime"
10
10
fi
11
11
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"
14
15
15
16
# clear output
16
17
rm -rf " ${DIR_OUT} "
17
18
mkdir " ${DIR_OUT} "
18
19
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
+
19
24
# 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)
21
26
RC=$?
22
27
23
28
echo " ${OUT} " >&2
You can’t perform that action at this time.
0 commit comments