You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
At present, CoC provides a few settings governing how diagnostics are displayed. Some relevant ones are:
diagnostic.enableHighlightLineNumber
diagnostic.enableSign
diagnostic.level
enableSign and enableHighlightLineNumber are boolean settings-- they are either on or off for all diagnostics that aren't totally ignored. This is problematic because some language server diagnostics at the hint and information level aren't designed to indicate a problem but merely provide additional information about the code. For example, PyRight notifies the client of unused function parameters with a hint diagnostic. This is intended to be subtle, and by default in VSCode dulls the highlighting of a symbol. CoC, however, makes you style these "annotations" similarly to real errors. Here are two issues discussing this situation with developers of PyRight and coc-pyright:
This scenario can be solved by allowing a finer level of control over diagnostic styling. Specifically:
Make all boolean styling options configurable on a level basis. For example, diagnostic.enableHighlightLineNumber could take a value of {hint,information,warning,error}, and the highlight would only be shown for diagnostics >= the configured level.
Similarly, it would be nice if it were possible to filter annotative diagnostics out of the diagnostic list, so that users could still benefit from the hints provided by a language server while keeping a separate list of errors/warnings that need to be addressed. This could be done with two adjustments:
allow CocList diagnostics to take a level argument of {error,warning,information,hint}
provide a setting like diagnostics.jumpListLevel (this is probably not the best name) that also takes a level argument of {error,warning,information,hint} and that controls the behavior of <Plug>(coc-diagnostic-next) and <Plug>(coc-diagnostic-prev), i.e. that causes these commands to skip lower-level diagonistics.
The text was updated successfully, but these errors were encountered:
I think the main problem is: how do we treat about the Hint diagnostic.
coc will display diagnostics with different sign highlight group, will gray out Hint diagnostics that with Unused tag, will preview the diagnostic message in floating window when your cursor on them, they're diagnostics with different severities, different UI.
VSCode won't display the Hint diagnostics, won't list them in Problems, but if you put your cursor on them, VSCode displayed the diagnostic message.
The LSP defines a diagnostic with Error/Warning/Information/Hint level, the client displays/lists the diagnostics in different ways.
Is your feature request related to a problem? Please describe.
At present, CoC provides a few settings governing how diagnostics are displayed. Some relevant ones are:
diagnostic.enableHighlightLineNumber
diagnostic.enableSign
diagnostic.level
enableSign
andenableHighlightLineNumber
are boolean settings-- they are either on or off for all diagnostics that aren't totally ignored. This is problematic because some language server diagnostics at thehint
andinformation
level aren't designed to indicate a problem but merely provide additional information about the code. For example, PyRight notifies the client of unused function parameters with ahint
diagnostic. This is intended to be subtle, and by default in VSCode dulls the highlighting of a symbol. CoC, however, makes you style these "annotations" similarly to real errors. Here are two issues discussing this situation with developers of PyRight and coc-pyright:Describe the solution you'd like
This scenario can be solved by allowing a finer level of control over diagnostic styling. Specifically:
diagnostic.enableHighlightLineNumber
could take a value of {hint,information,warning,error}, and the highlight would only be shown for diagnostics >= the configured level.Similarly, it would be nice if it were possible to filter annotative diagnostics out of the diagnostic list, so that users could still benefit from the hints provided by a language server while keeping a separate list of errors/warnings that need to be addressed. This could be done with two adjustments:
CocList diagnostics
to take a level argument of {error,warning,information,hint}diagnostics.jumpListLevel
(this is probably not the best name) that also takes a level argument of {error,warning,information,hint} and that controls the behavior of<Plug>(coc-diagnostic-next)
and<Plug>(coc-diagnostic-prev)
, i.e. that causes these commands to skip lower-level diagonistics.The text was updated successfully, but these errors were encountered: