From 931efb3708a5ba3a03bf06041597da28687c68e4 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sun, 26 Nov 2023 13:22:30 +1100 Subject: [PATCH] ci: add luals libs and tidy --- .gitignore | 2 +- .luarc.json | 6 ++++++ scripts/{lls-check => luals-check} | 7 +++---- 3 files changed, 10 insertions(+), 5 deletions(-) rename scripts/{lls-check => luals-check} (83%) diff --git a/.gitignore b/.gitignore index 10eabef9..5cd78185 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/lls-out/ +/luals-out/ diff --git a/.luarc.json b/.luarc.json index 6ae9cf62..77434c8d 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,6 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", "runtime.version" : "Lua 5.1", + "workspace": { + "library": [ + "$VIMRUNTIME", + "${3rd}/luv/library" + ] + }, "diagnostics": { "globals": [ "vim" diff --git a/scripts/lls-check b/scripts/luals-check similarity index 83% rename from scripts/lls-check rename to scripts/luals-check index 7efe1421..4a057387 100755 --- a/scripts/lls-check +++ b/scripts/luals-check @@ -1,13 +1,13 @@ #!/bin/sh # Performs a lua-language-server check on all files. -# lls-check/check.json will be produced on any issues, returning 1. -# Outputs check.json to stdout, all messages to stderr, to allow jq etc. +# luals-out/check.json will be produced on any issues, returning 1. +# Outputs only check.json to stdout, all other messages to stderr, to allow jq etc. VER_LLS="3.7.3" DIR_SRC="${PWD}" -DIR_OUT="${DIR_SRC}/lls-out" +DIR_OUT="${DIR_SRC}/luals-out" DIR_LLS="/tmp/lls" # clear output @@ -21,7 +21,6 @@ if [ ! -d "${DIR_LLS}" ]; then fi # execute from within the lua-language-server directory as it expects specific file locations -cd "${DIR_LLS}" || exit OUT=$("${DIR_LLS}/bin/lua-language-server" --checklevel=Information --check "${DIR_SRC}" --logpath="${DIR_OUT}" --loglevel=error) RC=$?