Add support for diagnostics display funcref for more flexible integration#1101
Add support for diagnostics display funcref for more flexible integration#1101martskins wants to merge 2 commits intoautozimu:devfrom
Conversation
190a476 to
a18b55c
Compare
|
This one is a little more involved or disruptive so I'll leave it to you to decide @autozimu, but I think it's a good way to integrate with ale. I think in our case, given that the server publishes the diagnostics when it pleases, we don't need to answer the |
a18b55c to
2dd003d
Compare
src/types.rs
Outdated
| pub hide_virtual_texts_on_insert: bool, | ||
| pub echo_project_root: bool, | ||
| pub enable_extensions: Option<HashMap<String, bool>>, | ||
| pub diagnostics_display_funcref: Option<String>, |
There was a problem hiding this comment.
Maybe we should reuse the diagnostics_list config instead? And allow the values to be either Quickfix, Location, Disabled or a Funcref ? I think that makes more sense.
There was a problem hiding this comment.
Pushed another commit to remove that config and replace it for support for funcref on LanguageClient_diagnosticsList. Made some changes to how selectionUI works in those terms as well, for the sake of uniformity.
4ff0ef4 to
fe80766
Compare
fe80766 to
366e653
Compare
366e653 to
33e94d9
Compare
This PR provides a config option for a function name to be used as a callback for the publish diagnostics call. What this does is enable us to integrate with external plugins that are used to display diagnostics, such as
dense-analysis/ale. The documentation includes an example of how to set that up.Note that the virtual texts will still be displayed if configured.
Fixes #800 and #852.