Skip to content

Commit

Permalink
Added settings.fragment.pumheight and settings.fragment.completeopt for
Browse files Browse the repository at this point in the history
  • Loading branch information
SidOfc committed Feb 21, 2022
1 parent 4b5fcb7 commit b697314
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ noremap <Plug>(mkdx-prev-section) :call mkdx#JumpToSectio
if (g:mkdx#settings.links.fragment.complete)
setlocal completefunc=mkdx#Complete
setlocal pumheight=15
setlocal iskeyword+=\-
setlocal completeopt=noinsert,menuone

if (g:mkdx#settings.links.fragment.pumheight)
exe 'setlocal pumheight=' . g:mkdx#settings.links.fragment.pumheight
endif

if (g:mkdx#settings.links.fragment.completeopt)
exe 'setlocal completeopt=' . g:mkdx#settings.links.fragment.completeopt
endif
endif

if (get(g:, 'markdown_folding', 0))
Expand Down
2 changes: 1 addition & 1 deletion plugin/mkdx.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let s:defaults = {
\ 'default': 'center' } },
\ 'links': { 'external': { 'enable': 0, 'timeout': 3, 'host': '', 'relative': 1,
\ 'user_agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/9001.0.0000.000 vim-mkdx/1.10.0' },
\ 'fragment': { 'jumplist': 1, 'complete': 1 },
\ 'fragment': { 'jumplist': 1, 'complete': 1, 'pumheight': 15, 'completeopt': 'noinsert,menuone' },
\ 'conceal': 1 },
\ 'highlight': { 'enable': 0, 'frontmatter': { 'yaml': 1, 'toml': 0, 'json': 0 } },
\ 'auto_update': { 'enable': 1 },
Expand Down

0 comments on commit b697314

Please sign in to comment.