Ref. #453: Updated docs on deoplete config
This commit is contained in:
parent
3494d32a67
commit
bea8939a94
@ -50,7 +50,8 @@ CONTENTS *vimtex-contents*
|
||||
Complete standalone file names |vimtex-complete-standalone|
|
||||
Complete glossary entries |vimtex-complete-glossary|
|
||||
Autocomplete |vimtex-complete-auto|
|
||||
Neocomplete and deoplete |vimtex-complete-neocomplete|
|
||||
Neocomplete |vimtex-complete-neocomplete|
|
||||
deoplete |vimtex-complete-deoplete|
|
||||
YouCompleteMe |vimtex-complete-youcompleteme|
|
||||
VimCompletesMe |vimtex-complete-vcm|
|
||||
Folding |vimtex-folding|
|
||||
@ -1438,13 +1439,10 @@ there is |VimCompletesMe| that overrides <tab> to trigger different built-in
|
||||
completions, such as the omni-completion by vimtex, depending on the context.
|
||||
See below for descriptions on how to setup these with |vimtex|.
|
||||
|
||||
neocomplete and deoplete~
|
||||
neocomplete~
|
||||
*vimtex-complete-neocomplete*
|
||||
*vimtex-complete-deoplete*
|
||||
|neocomplete| is my preferred choice for an automatic completion engine in vim.
|
||||
The plugin is available here: https://github.com/Shougo/neocomplete.vim.
|
||||
|deoplete| is a similar plugin by Shougo written specifically for Neovim, see
|
||||
here: https://github.com/Shougo/deoplete.nvim.
|
||||
|
||||
The following options may be used to enable automatic completion for LaTeX
|
||||
documents with |neocomplete| and |vimtex|s omni completion function: >
|
||||
@ -1463,18 +1461,31 @@ documents with |neocomplete| and |vimtex|s omni completion function: >
|
||||
\ . '|includepdf%(\s*\[[^]]*\])?\s*\{[^}]*'
|
||||
\ . '|includestandalone%(\s*\[[^]]*\])?\s*\{[^}]*'
|
||||
\ . ')'
|
||||
<
|
||||
The |deoplete| option is similar to that of |neocomplete|, but we must append |\m|,
|
||||
thus: >
|
||||
|
||||
if !exists('g:deoplete#omni_patterns')
|
||||
let g:deoplete#omni_patterns = {}
|
||||
deoplete~
|
||||
*vimtex-complete-deoplete*
|
||||
|deoplete| is similar to |neocomplete|, but is written specifically for Neovim, see
|
||||
here: https://github.com/Shougo/deoplete.nvim. To configure for `vimtex`, one
|
||||
may use: >
|
||||
|
||||
if !exists('g:deoplete#omni#input_patterns')
|
||||
let g:deoplete#omni#input_patterns = {}
|
||||
endif
|
||||
let g:deoplete#omni_patterns.tex =
|
||||
\ '\v\\%('
|
||||
\ ...
|
||||
\ . ')\m'
|
||||
<
|
||||
let g:deoplete#omni#input_patterns.tex = '\\(?:'
|
||||
\ . '\w*cite\w*(?:\s*\[[^]]*\]){0,2}\s*{[^}]*'
|
||||
\ . '|\w*ref(?:\s*\{[^}]*|range\s*\{[^,}]*(?:}{)?)'
|
||||
\ . '|hyperref\s*\[[^]]*'
|
||||
\ . '|includegraphics\*?(?:\s*\[[^]]*\]){0,2}\s*\{[^}]*'
|
||||
\ . '|(?:include(?:only)?|input)\s*\{[^}]*'
|
||||
\ . '|\w*(gls|Gls|GLS)(pl)?\w*(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
|
||||
\ . '|includepdf(\s*\[[^]]*\])?\s*\{[^}]*'
|
||||
\ . '|includestandalone(\s*\[[^]]*\])?\s*\{[^}]*'
|
||||
\ .')'
|
||||
|
||||
Note: I don't personally use |deoplete|, and I have not tested the above
|
||||
expression. Please let me know if the regex does not work as intended,
|
||||
so that we can update it appropriately.
|
||||
|
||||
YouCompleteMe~
|
||||
*vimtex-complete-youcompleteme*
|
||||
|youcompleteme| is probably the most popular code-completion engine for Vim. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user