Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit f364102

Browse files
authored
Resolve LspHover Conceal Issue (prabirshrestha#720)
1. Do not clear Conceal highlight group 2. Do not highlight concealed chars by using syntax region. This fixes different background of concealed cchar and popup window original solution had. See prabirshrestha#719 for details.
1 parent 9962ef9 commit f364102

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

syntax/lsp-hover.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,9 @@ function! s:cleanup_markdown() abort
4141
" Workaround for: https://github.com/palantir/python-language-server/issues/386
4242
if has('conceal')
4343
for l:escaped_char in ['`', '*', '_', '{', '}', '(', ')', '<', '>', '#', '+', '.', '!', '-']
44-
execute printf('syntax match markdownEscape "\\[][%s]" conceal cchar=%s', l:escaped_char, l:escaped_char)
44+
execute printf('syntax region vimLspMarkdownEscape matchgroup=Conceal start="\\\ze[%s]" end="[%s]\zs" concealends', l:escaped_char, l:escaped_char)
4545
endfor
4646
end
47-
48-
" Don't highlight concealed chars
49-
highlight clear Conceal
5047
endfunction
5148

5249
call s:do_highlight()

0 commit comments

Comments
 (0)