summaryrefslogtreecommitdiff
path: root/script/cli
diff options
context:
space:
mode:
authorPaul Emmerich <tandanu@deadlybossmods.com>2024-02-26 20:41:50 +0100
committerPaul Emmerich <tandanu@deadlybossmods.com>2024-02-26 22:54:14 +0100
commitfe6285335360e62a511ff55417c810c0364dd37a (patch)
treed8d207e62acdd5fa8a2e7a535ef2daa025f45064 /script/cli
parent37233462b95b9a104bf30adf50cfa1c4416cc264 (diff)
downloadlua-language-server-fe6285335360e62a511ff55417c810c0364dd37a.zip
Only load files in workspace for --check (skip libraries)
Diffstat (limited to 'script/cli')
-rw-r--r--script/cli/check.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/cli/check.lua b/script/cli/check.lua
index 146035b6..84ac8766 100644
--- a/script/cli/check.lua
+++ b/script/cli/check.lua
@@ -27,6 +27,7 @@ if not rootUri then
print(lang.script('CLI_CHECK_ERROR_URI', rootPath))
return
end
+rootUri = rootUri:gsub("/$", "")
if CHECKLEVEL then
if not define.DiagnosticSeverity[CHECKLEVEL] then
@@ -70,7 +71,7 @@ lclient():start(function (client)
end
config.set(rootUri, 'Lua.diagnostics.disable', util.getTableKeys(disables, true))
- local uris = files.getAllUris(rootUri)
+ local uris = files.getChildFiles(rootUri)
local max = #uris
for i, uri in ipairs(uris) do
files.open(uri)