From f36410202e3ddece3170483c250c4d6cae0d639b Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Fri, 14 Feb 2020 13:31:56 +0300 Subject: [PATCH] Resolve LspHover Conceal Issue (#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 #719 for details. --- syntax/lsp-hover.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/syntax/lsp-hover.vim b/syntax/lsp-hover.vim index 7605f4028..22d3e9f72 100644 --- a/syntax/lsp-hover.vim +++ b/syntax/lsp-hover.vim @@ -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()