Skip to content

Commit

Permalink
Merge pull request #3052 from emuell/patch-1
Browse files Browse the repository at this point in the history
Avoid truncating output in ---doc mode
  • Loading branch information
sumneko authored Jan 24, 2025
2 parents 5275a75 + d5135ab commit 06943cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased
<!-- Add all new changes here. They will be moved under a version at release -->
* `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
Expand Down
3 changes: 2 additions & 1 deletion script/vm/infer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 06943cf

Please sign in to comment.