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

diagnostics: support sending ALE output to Neovim's diagnostics API #4345

Merged
merged 10 commits into from
Jan 29, 2023

Conversation

mathstuf
Copy link
Contributor

@mathstuf mathstuf commented Oct 28, 2022

Closes #4005

This resurrects #4135. I'll roll with it locally to test it out more (especially to see if that off-by-one is actually fixed or not). Other than test suite bits, the review comments from there have been addressed.

Pulling the TODO item from the original PR description:

  • Fix off by 1 issue reported by @daliusd below
  • Maybe good idea to add a test test_linting_sets_signs.vader or test_sign_placement.vader that tests ALE signs are disabled when neovim diagnostics are enabled.
  • Also maybe add a test to test_cursor_warnings.vader that tests cursor messages is not echoed when neovim diagnostics are enabled.
  • Figure out if it's OK to disable loclist/quickfix like we do currently
  • Fix issue with g:ale_virtualtext_cursor reported below

No tests yet (beyond updating the existing config one for the new option).

@w0rp
Copy link
Member

w0rp commented Nov 25, 2022

If you can address the remaining TODO items here, I'll merge this one. I'm not working on it myself because I'm not a regular NeoVim user. (I'm waiting until NeoVim is named 1.0 and has some promises to not change default configuration for some time.)

@mathstuf
Copy link
Contributor Author

I've been running with it for a while now and it works AFAICT. However, I still need to investigate these items to see if they're a problem yet. Not sure when I'll get time for that though.

I'm waiting until NeoVim is named 1.0 and has some promises to not change default configuration for some time.

FWIW, I've only needed to set two things (that I should have been setting anyways) when migrating. That's other than the massive s/vim/nvim/g changes that needed to be done.

@bluz71
Copy link

bluz71 commented Nov 26, 2022

If you can address the remaining TODO items here, I'll merge this one. I'm not working on it myself because I'm not a regular NeoVim user. (I'm waiting until NeoVim is named 1.0 and has some promises to not change default configuration for some time.)

Neovim 1.0 could be years away.
Current stable release is 0.8.
Current development release is 0.9.
Since 0.5 release, Neovim is releasing a stable version (0.6, 0.7, 0.8) on a six month cadence (give or take).

0.5 --> 0.6 had major LSP API changes, basically a new module vim.diagnostic was extracted out of vim.lsp.

With respect to ALE, I am very confident that the APIs provided by Neovim that ALE would need to use to satisfy the PR are stable now and are very unlikely to change.

Best regards.

@w0rp
Copy link
Member

w0rp commented Dec 2, 2022

If you can address the remaining TODO items here, I'll merge this one. I'm not working on it myself because I'm not a regular NeoVim user. (I'm waiting until NeoVim is named 1.0 and has some promises to not change default configuration for some time.)

Neovim 1.0 could be years away. Current stable release is 0.8. Current development release is 0.9. Since 0.5 release, Neovim is releasing a stable version (0.6, 0.7, 0.8) on a six month cadence (give or take).

0.5 --> 0.6 had major LSP API changes, basically a new module vim.diagnostic was extracted out of vim.lsp.

With respect to ALE, I am very confident that the APIs provided by Neovim that ALE would need to use to satisfy the PR are stable now and are very unlikely to change.

Best regards.

That's good. I was speaking about my personal editor of choice. I'll be using Vim until Neovim hits 1.0.

@w0rp w0rp marked this pull request as ready for review January 29, 2023 16:37
@w0rp
Copy link
Member

w0rp commented Jan 29, 2023

I and @Angelchev are fixing this now.

@w0rp
Copy link
Member

w0rp commented Jan 29, 2023

@hsanson I'm going to disable ALE signs when sending messages to Neovim diagnostics is enabled, as there are ways of getting signs to appear for Neovim diagnostics. We can look into that later.

@w0rp w0rp merged commit 116d713 into dense-analysis:master Jan 29, 2023
@mathstuf mathstuf deleted the neovim-diag-api branch January 30, 2023 13:38
mnikulin pushed a commit to mnikulin/ale that referenced this pull request Nov 12, 2023
…ense-analysis#4345)

Support replacing ALE's display of problems with sending problems to the Neovim diagnostics API.

:help g:ale_use_neovim_diagnostics_api

Co-authored-by: David Balatero <dbalatero@users.noreply.github.com>
Co-authored-by: Georgi Angelchev <angelchev@live.co.uk>
Co-authored-by: w0rp <devw0rp@gmail.com>
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.

[Neovim 0.6 Diagnostic API] ALE as the source of diagnostics to Neovim's new Diagnostic module
5 participants