Skip to content

Avoid truncating output in ---doc mode #3052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading