summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@users.noreply.github.com>2023-01-29 17:25:09 +0000
committerGitHub <noreply@github.com>2023-01-29 17:25:09 +0000
commit116d713f63c7a81663fa53efa10e34649c9479e3 (patch)
tree0ca5ed37b4320e70901de6b9bcafee53c259a2aa /plugin
parent0af4899605af26dd8ea7fe79acff6ab99f6532b2 (diff)
downloadale-116d713f63c7a81663fa53efa10e34649c9479e3.zip
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>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 6aa115ea..b9786bb0 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -187,6 +187,15 @@ let g:ale_deno_executable = get(g:, 'ale_deno_executable', 'deno')
" If 1, enable a popup menu for commands.
let g:ale_popup_menu_enabled = get(g:, 'ale_popup_menu_enabled', has('gui_running'))
+" If 1, disables ALE's built in error display. Instead, all errors are piped
+" to the diagnostics API.
+let g:ale_use_neovim_diagnostics_api = get(g:, 'ale_use_neovim_diagnostics_api', 0)
+
+if g:ale_use_neovim_diagnostics_api && !has('nvim-0.6')
+ " no-custom-checks
+ echoerr('Setting g:ale_use_neovim_diagnostics_api to 1 requires Neovim 0.6+.')
+endif
+
if g:ale_set_balloons is 1 || g:ale_set_balloons is# 'hover'
call ale#balloon#Enable()
endif