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 standalone file names |vimtex-complete-standalone|
|
||||||
Complete glossary entries |vimtex-complete-glossary|
|
Complete glossary entries |vimtex-complete-glossary|
|
||||||
Autocomplete |vimtex-complete-auto|
|
Autocomplete |vimtex-complete-auto|
|
||||||
Neocomplete and deoplete |vimtex-complete-neocomplete|
|
Neocomplete |vimtex-complete-neocomplete|
|
||||||
|
deoplete |vimtex-complete-deoplete|
|
||||||
YouCompleteMe |vimtex-complete-youcompleteme|
|
YouCompleteMe |vimtex-complete-youcompleteme|
|
||||||
VimCompletesMe |vimtex-complete-vcm|
|
VimCompletesMe |vimtex-complete-vcm|
|
||||||
Folding |vimtex-folding|
|
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.
|
completions, such as the omni-completion by vimtex, depending on the context.
|
||||||
See below for descriptions on how to setup these with |vimtex|.
|
See below for descriptions on how to setup these with |vimtex|.
|
||||||
|
|
||||||
neocomplete and deoplete~
|
neocomplete~
|
||||||
*vimtex-complete-neocomplete*
|
*vimtex-complete-neocomplete*
|
||||||
*vimtex-complete-deoplete*
|
|
||||||
|neocomplete| is my preferred choice for an automatic completion engine in vim.
|
|neocomplete| is my preferred choice for an automatic completion engine in vim.
|
||||||
The plugin is available here: https://github.com/Shougo/neocomplete.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
|
The following options may be used to enable automatic completion for LaTeX
|
||||||
documents with |neocomplete| and |vimtex|s omni completion function: >
|
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*\{[^}]*'
|
\ . '|includepdf%(\s*\[[^]]*\])?\s*\{[^}]*'
|
||||||
\ . '|includestandalone%(\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')
|
deoplete~
|
||||||
let g:deoplete#omni_patterns = {}
|
*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
|
endif
|
||||||
let g:deoplete#omni_patterns.tex =
|
let g:deoplete#omni#input_patterns.tex = '\\(?:'
|
||||||
\ '\v\\%('
|
\ . '\w*cite\w*(?:\s*\[[^]]*\]){0,2}\s*{[^}]*'
|
||||||
\ ...
|
\ . '|\w*ref(?:\s*\{[^}]*|range\s*\{[^,}]*(?:}{)?)'
|
||||||
\ . ')\m'
|
\ . '|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~
|
YouCompleteMe~
|
||||||
*vimtex-complete-youcompleteme*
|
*vimtex-complete-youcompleteme*
|
||||||
|youcompleteme| is probably the most popular code-completion engine for Vim. The
|
|youcompleteme| is probably the most popular code-completion engine for Vim. The
|
||||||
|
Loading…
x
Reference in New Issue
Block a user