folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.36k stars 175 forks source link

[Question] Very long tsserver LSP diagnostic message truncated, why? #296

Closed RRikor closed 1 year ago

RRikor commented 1 year ago

I'm seeing very long messages from tsserver being truncated in the Trouble window. It seems to be related to the width of my terminal/neovim screen.

For example, this is the message in my lsp.log file

No overload matches this call.\n Overload 1 of 2, '(params: DeleteObjectRequest, callback?: (err: AWSError, data: DeleteObjectOutput) => void): Request<DeleteObjectOutput, AWSError>', gave the following error.\n Argument of type '{ bucket: string; key: string; }' is not assignable to parameter of type 'DeleteObjectRequest'.\n Object literal may only specify known properties, but 'bucket' does not exist in type 'DeleteObjectRequest'. Did you mean to write 'Bucket'?\n Overload 2 of 2, '(callback?: (err: AWSError, data: DeleteObjectOutput) => void): Request<DeleteObjectOutput, AWSError>', gave the following error.\n Argument of type '{ bucket: string; key: string; }' is not assignable to parameter of type '(err: AWSError, data: DeleteObjectOutput) => void'.\n Object literal may only specify known properties, and 'bucket' does not exist in type '(err: AWSError, data: DeleteObjectOutput) => void'."

And this is the message in the Trouble window with my normal font size. Neovim in full screen on a Kitty terminal.

│  No overload matches this call. Overload 1 of 2, '(params: DeleteObjectRequest, callback?: (err: AWSError, data: DeleteObjectOutput) => void): Request<DeleteObjectOutput, AWSError>', gave the following error. Argument of type '{ bucket: string; key: string; }' is not assignable to parameter of type 'DeleteObjectRequ typescript (2769) [127, 7]

But if I make my font size really really tiny I can get almost the entire message printed, albeit not readable without a magnifying glass.

│  No overload matches this call. Overload 1 of 2, '(params: DeleteObjectRequest, callback?: (err: AWSError, data: DeleteObjectOutput) => void): Request<DeleteObjectOutput, AWSError>', gave the following error. Argument of type '{ bucket: string; key: string; }' is not assignable to parameter of type 'DeleteObjectRequest'. Object literal may only specify known properties, but 'bucket' does not exist in type 'DeleteObjectRequest'. Did you mean to write 'Bucket'? Overload 2 of 2, '(callback?: (err: AWSError, data: DeleteObjectOutput) => void): Request<DeleteObjectOutput, AWSError>', gave the following error. Argument of type '{ bucket: string; key: string; }' is not assignable to parameter of type '(err: AWSError, data: DeleteObjectOutput) => void'. Object literal may only specify known properties, and 'bucket' does not exist in typescript (2769) [127, 7]

My Trouble window is in the bottom position. Is there some way to get the entire message to be printed straight away. Or could this be caused by some other setting somewhere?

folke commented 1 year ago

Go to the message and press K in trouble.