mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
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.
This commit is contained in:
@@ -41,12 +41,9 @@ function! s:cleanup_markdown() abort
|
|||||||
" Workaround for: https://github.com/palantir/python-language-server/issues/386
|
" Workaround for: https://github.com/palantir/python-language-server/issues/386
|
||||||
if has('conceal')
|
if has('conceal')
|
||||||
for l:escaped_char in ['`', '*', '_', '{', '}', '(', ')', '<', '>', '#', '+', '.', '!', '-']
|
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
|
endfor
|
||||||
end
|
end
|
||||||
|
|
||||||
" Don't highlight concealed chars
|
|
||||||
highlight clear Conceal
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call s:do_highlight()
|
call s:do_highlight()
|
||||||
|
|||||||
Reference in New Issue
Block a user