mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-11 09:08:32 +08:00
Use different group names for signs and virtual text (#4704)
Since Neovim commit c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156, the sign API uses extmarks internally. Virtual text is already rendered using extmarks. ALE uses the same group name for both signs and virtual text and as a result, both are placed in the same extmark group. Since ALE deletes all extmarks in the virtual text group after all signs have been placed, no signs are ever shown. This commit fixes this by renaming the sign group from `ale` to `ale_signs`.
This commit is contained in:
@@ -71,7 +71,7 @@ Before:
|
||||
function! ParseSigns()
|
||||
redir => l:output
|
||||
if has('nvim-0.4.2') || has('patch-8.1.614')
|
||||
silent sign place group=ale
|
||||
silent sign place group=ale_signs
|
||||
else
|
||||
silent sign place
|
||||
endif
|
||||
@@ -155,9 +155,9 @@ Execute(The current signs should be set for running a job):
|
||||
|
||||
Execute(Loclist items with sign_id values should be kept):
|
||||
if has('nvim-0.4.2') || has('patch-8.1.614')
|
||||
exec 'sign place 1000347 group=ale line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 group=ale line=15 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000349 group=ale line=16 name=ALEWarningSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000347 group=ale_signs line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 group=ale_signs line=15 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000349 group=ale_signs line=16 name=ALEWarningSign buffer=' . bufnr('')
|
||||
else
|
||||
exec 'sign place 1000347 line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 line=15 name=ALEErrorSign buffer=' . bufnr('')
|
||||
@@ -280,10 +280,10 @@ Execute(It should be possible to clear signs with empty lists):
|
||||
" We can fail to remove signs if there are multiple signs on one line,
|
||||
" say after deleting lines in Vim, etc.
|
||||
if has('nvim-0.4.2') || has('patch-8.1.614')
|
||||
exec 'sign place 1000347 group=ale line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 group=ale line=3 name=ALEWarningSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000349 group=ale line=10 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000350 group=ale line=10 name=ALEWarningSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000347 group=ale_signs line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 group=ale_signs line=3 name=ALEWarningSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000349 group=ale_signs line=10 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000350 group=ale_signs line=10 name=ALEWarningSign buffer=' . bufnr('')
|
||||
else
|
||||
exec 'sign place 1000347 line=3 name=ALEErrorSign buffer=' . bufnr('')
|
||||
exec 'sign place 1000348 line=3 name=ALEWarningSign buffer=' . bufnr('')
|
||||
|
||||
Reference in New Issue
Block a user