From aa53e9a0d1abb045c4461ae03ed000b6be4f0318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20M=C3=BCller=20/=20taktik?= <11521600+emuell@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:06:55 +0100 Subject: [PATCH 1/2] Avoid truncating output in ---doc mode fixes https://github.com/LuaLS/lua-language-server/issues/3049 --- script/vm/infer.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/vm/infer.lua b/script/vm/infer.lua index 099b894b4..6f21a76ab 100644 --- a/script/vm/infer.lua +++ b/script/vm/infer.lua @@ -473,7 +473,8 @@ function mt:view(uri, default) end end - if #view > 200 then + -- do not truncate if exporting doc + if not DOC and #view > 200 then view = view:sub(1, 180) .. '...(too long)...' .. view:sub(-10) end From d5135abc5edd19a83b2394c1e6c5a2cdbbcdd0da Mon Sep 17 00:00:00 2001 From: taktik Date: Thu, 23 Jan 2025 17:13:32 +0100 Subject: [PATCH 2/2] doc: update changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 313cb53bf..10339536c 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` Don't truncate any output when running in `--doc` mode [#3049](https://github.com/LuaLS/lua-language-server/issues/3049) * `CHG` [#3014] Generic pattern now supports definition after capture and optional, union, array ```lua ---@generic T