-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for diagnostics display funcref for more flexible integration #1101
base: dev
Are you sure you want to change the base?
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
@@ -211,6 +211,7 @@ pub struct State { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.