diagnostics: support sending ALE output to Neovim's diagnostics API (#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>
This commit is contained in:
Ben Boeckel
2023-01-29 17:25:09 +00:00
committed by GitHub
parent 0af4899605
commit 116d713f63
9 changed files with 137 additions and 12 deletions

View File

@@ -11,6 +11,7 @@ Before:
Save g:ale_set_quickfix
Save g:ale_set_signs
Save g:ale_command_wrapper
Save g:ale_use_neovim_diagnostics_api
let g:ale_command_wrapper = ''
let g:ale_buffer_info = {}
@@ -22,6 +23,7 @@ Before:
let g:ale_set_loclist = 0
let g:ale_set_highlights = 0
let g:ale_echo_cursor = 0
let g:ale_use_neovim_diagnostics_api = 0
call ale#sign#Clear()
@@ -74,3 +76,10 @@ Execute(The signs should be updated after linting is done):
call ale#test#FlushJobs()
AssertEqual [['1', 'ALEWarningSign'], ['2', 'ALEErrorSign']], CollectSigns()
Execute(Signs should not be set when diagnostics API integration is enabled):
let g:ale_use_neovim_diagnostics_api = 1
ALELint
call ale#test#FlushJobs()
AssertEqual [], CollectSigns()