Skip to content
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 eglot-diagnostics-hook, and use it for flymake #658

Closed
wants to merge 1 commit into from

Conversation

purcell
Copy link
Contributor

@purcell purcell commented Apr 1, 2021

We provide a hook that is called whenever diagnostics are
received, and each hook function will be passed the diagnostics. This
allows clean extension to support flycheck or other mechanisms for
diagnostics display, while maintaining the existing flymake support
intact.

See #596


A couple of design notes:

  • Diagnostics passed to hook functions are still flymake diagnostics, but that seems okay to me: it's as good a format for structured diagnostics as any. The alternative would be to pass the raw diag-specs and decode them in the hook functions, which is probably overthinking things at this point.
  • Flycheck can handle diagnostics for "other files" and display them sanely, and it's not clear how/if this would fit into the scheme.

We provide a hook that is called whenever diagnostics are
received, and each hook function will be passed the diagnostics. This
allows clean extension to support flycheck or other mechanisms for
diagnostics display, while maintaining the existing flymake support
intact.

See joaotavora#596
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant