denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
95.36k stars 5.29k forks source link

LSP truncates complex typescript types #20949

Open mccraigmccraig opened 11 months ago

mccraigmccraig commented 11 months ago

the deno LSP truncates information from complex typescript types with ... ellipses - i confirmed the same behaviour with both VSCode and emacs

image

something similar happens with the vanilla typescript LSP - but there is a workaround available, at the possible expense of some performance

it would be great if deno had a similar ability to avoid truncation of type information

Seally commented 11 months ago

Does the noErrorTruncation option in deno.json help (it's already supported)? Or do you need access to the defaultMaximumTruncationLength variable?

mccraigmccraig commented 11 months ago

oh, cool @Seally - in this particular instance noErrorTruncation does work

image

i strongly suspect that i will also be wanting access to defaultMaximumTruncationLength in the near future though - my types are compounding 😬

mccraigmccraig commented 11 months ago

suspicion confirmed - it didn't take much of a longer type definition before i started seeing truncation again, so i will need access to the defaultMaximumTruncationLength variable to see the full types

(i have confirmed in this particular case that the vanilla typescript LSP with increased defaultMaximumTruncationLength shows me the full type)

image