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 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