Skip to content

Commit

Permalink
Resolve LspHover Conceal Issue (#720)
Browse files Browse the repository at this point in the history
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 #719 for details.
  • Loading branch information
habamax authored Feb 14, 2020
1 parent 9962ef9 commit f364102
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions syntax/lsp-hover.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ function! s:cleanup_markdown() abort
" Workaround for: https://github.com/palantir/python-language-server/issues/386
if has('conceal')
for l:escaped_char in ['`', '*', '_', '{', '}', '(', ')', '<', '>', '#', '+', '.', '!', '-']
execute printf('syntax match markdownEscape "\\[][%s]" conceal cchar=%s', l:escaped_char, l:escaped_char)
execute printf('syntax region vimLspMarkdownEscape matchgroup=Conceal start="\\\ze[%s]" end="[%s]\zs" concealends', l:escaped_char, l:escaped_char)
endfor
end

" Don't highlight concealed chars
highlight clear Conceal
endfunction

call s:do_highlight()
Expand Down

0 comments on commit f364102

Please sign in to comment.