diff options
author | Paul Emmerich <tandanu@deadlybossmods.com> | 2024-04-20 18:03:29 +0200 |
---|---|---|
committer | Paul Emmerich <tandanu@deadlybossmods.com> | 2024-04-20 20:39:17 +0200 |
commit | 577b2eb8c50b6d19c93e3d2937ec45c5ae3ca022 (patch) | |
tree | 4792705754e98797a7b048b813a4bf06474b96e3 /script | |
parent | 655ac540d6fba07b0c723fee9693bcbd2bf3b76a (diff) | |
download | lua-language-server-577b2eb8c50b6d19c93e3d2937ec45c5ae3ca022.zip |
--check: Attempt to write output even if an error occurs
This enables writing partial output if you press ctrl-c after seeing
the first errors show up.
Diffstat (limited to 'script')
-rw-r--r-- | script/cli/check.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/script/cli/check.lua b/script/cli/check.lua index da55b658..3902c4aa 100644 --- a/script/cli/check.lua +++ b/script/cli/check.lua @@ -1,4 +1,4 @@ -local lclient = require 'lclient' +local lclient = require 'lclient'() local furi = require 'file-uri' local ws = require 'workspace' local files = require 'files' @@ -41,8 +41,14 @@ util.enableCloseFunction() local lastClock = os.clock() local results = {} + +local function errorhandler(err) + print(err) + print(debug.traceback()) +end + ---@async -lclient():start(function (client) +xpcall(lclient.start, errorhandler, lclient, function (client) client:registerFakers() client:initialize { |