From 203f7c9e732697e3dc1e85b369429926e9ae774e Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 16 Jan 2018 21:01:06 -0800 Subject: [PATCH] Set a lower priority for diagnostic matches Avoids masking `hlsearch` and potentially other highlighting with a priority under 10. --- CHANGELOG.md | 1 + autoload/lsc/highlights.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf0392f..23690bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Improve performance of incremental diff. - Print messages received on stderr. - Don't open an empty quickfix list when no references are found. +- Don't mask `hlsearch` with diagnostics. # 0.2.8 diff --git a/autoload/lsc/highlights.vim b/autoload/lsc/highlights.vim index d65722af..318fa7af 100644 --- a/autoload/lsc/highlights.vim +++ b/autoload/lsc/highlights.vim @@ -16,7 +16,7 @@ function! lsc#highlights#update() abort if &diff | return | endif for line in values(lsc#diagnostics#forFile(expand('%:p'))) for diagnostic in line - let match = matchaddpos(diagnostic.group, diagnostic.ranges) + let match = matchaddpos(diagnostic.group, diagnostic.ranges, -1) call add(w:lsc_diagnostic_matches, match) endfor endfor