neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.15k stars 953 forks source link

Extend CocDiagnostics or fillDiagnostics to work with CocList #4952

Closed asmodeus812 closed 3 months ago

asmodeus812 commented 3 months ago

Is your feature request related to a problem? Please describe. I would be great if we can choose to open the current buffer diagnostics in a CocList instead of directly populating the location list with all of them.

Describe the solution you'd like When we trigger OpenDiagostics, maybe an input flag can be passed (at the moment it accepts the loclist height only), to decide where to dump the data in location list or coclist. Another option could be a coc.preference config setting.

Describe alternatives you've considered No alternative, the location list implementation is baked in / non configurable.

Additional context None

fannheyward commented 3 months ago

Does CocList diagnostics work as you want?

asmodeus812 commented 3 months ago

Isnt that one for the entire workspace, iwas looking for file / buffer local list only ?

fannheyward commented 3 months ago

Yes, CocList diagnostics returns all diagnostics of the workspace.

aispeaking commented 3 months ago

@fannheyward Great! I'm just looking for this feature.

And is it able to omitting the file name in the label when '--buffer' is given? You known the diagnostic messages are always too long and that may leave more space for it.

fannheyward commented 3 months ago

@aispeaking check :h coc-config-list-source-diagnostics-pathFormat, set list.source.diagnostics.pathFormat.

aispeaking commented 3 months ago

The pathFormat is applied to both workspace and buffer mode. So... What do you think make 'full' and 'short' downgrade to 'filename' if in buffer mode.