Skip to content

Commit

Permalink
bugfix for popup with float style
Browse files Browse the repository at this point in the history
  • Loading branch information
jayli committed Dec 16, 2023
1 parent f5dc8ba commit 119e4f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
3 changes: 3 additions & 0 deletions autoload/easycomplete/popup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,9 @@ function! s:NVimShow(opt, windowtype, float_type)
call setbufvar(winbufnr(winid), '&filetype', 'txt')
endif
if a:windowtype == "float" && a:float_type == "signature"
if has("nvim-0.9.0")
call setbufvar(winbufnr(winid), '&filetype', 'markdown')
endif
call easycomplete#ui#ApplyMarkdownSyntax(winid)
endif
endfunction
Expand Down
21 changes: 13 additions & 8 deletions autoload/easycomplete/ui.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,19 @@ function! easycomplete#ui#ApplyMarkdownSyntax(winid)
\ "matchgroup=Conceal end=/\%(``\)\@!`/ containedin=TOP concealends"],"")
let original_filetype = getwinvar(a:winid, "&filetype")
if has("nvim")
let local_filetype = has("nvim-0.9.0") ? "txt" : "help"
let exec_cmd = [
\ "hi helpCommand cterm=underline gui=underline ctermfg=White guifg=White",
\ "silent! syntax clear NewCodeBlock",
\ regin_cmd,
\ "hi! link NewCodeBlock helpCommand",
\ "let &filetype='" . local_filetype . "'",
\ ]
if has("nvim-0.9.0")
let exec_cmd = [
\ "hi markdownCode cterm=underline gui=underline",
\ ]
else
let exec_cmd = [
\ "hi helpCommand cterm=underline gui=underline ctermfg=White guifg=White",
\ "silent! syntax clear NewCodeBlock",
\ regin_cmd,
\ "hi! link NewCodeBlock helpCommand",
\ "let &filetype='help'",
\ ]
endif
else
let exec_cmd = [
\ "hi helpCommand cterm=underline gui=underline ctermfg=White guifg=White",
Expand Down

0 comments on commit 119e4f9

Please sign in to comment.