neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

Is there any way to get non-truncated messages from tsserver? #444

Closed nullromo closed 7 months ago

nullromo commented 8 months ago

Problem

When I use the show_docs feature, sometimes tsserver will truncate the results

Config

config I got this from the CoC README. ```lua function _G.show_docs() local cw = vim.fn.expand('function') if vim.fn.index({'vim', 'help'}, vim.bo.filetype) >= 0 then vim.api.nvim_command('h ' .. cw) elseif vim.api.nvim_eval('coc#rpc#ready()') then vim.fn.CocActionAsync('doHover') else vim.api.nvim_command('!' .. vim.o.keywordprg .. ' ' .. cw) end end vim.keymap.set('n', 'K', 'lua _G.show_docs()', {silent = true}) ```

Examples

Here are some examples:

image

As you can see, the window says ... 5 more ... but I don't have a way of seeing what those 5 more are.

image

In this one, you can see that some of the types are listed as { ... }, which doesn't really tell me anything.

Desired Outcome

I just need to be able to see the type of a variable without truncation (or at least with a longer truncation limit). Maybe there's an option I can pass to coc-tsserver or to tsserver itself for this. Or maybe there's another command I can run that will give me the full information instead of the truncated version.

fannheyward commented 7 months ago

I don't think coc-tsserver truncate the messages, can you test VSCode with your codes? Properly this's tsserver's behavior.

nullromo commented 7 months ago

I installed VSCode to test it out and it looks the same.

Now I see what you mean—tsserver is actually separate from coc-tsserver and this isn't really the right place for the bug report.

Based on what I've been reading online recently, I don't think tsserver is even capable of displaying full error messages...

Thanks anyway though.