Fix glc -> gls (#263)
This commit is contained in:
parent
bea99a59e8
commit
a21eeadc5e
@ -17,7 +17,7 @@ endfunction
|
|||||||
function! vimtex#complete#init_script() " {{{1
|
function! vimtex#complete#init_script() " {{{1
|
||||||
if !g:vimtex_complete_enabled | return | endif
|
if !g:vimtex_complete_enabled | return | endif
|
||||||
|
|
||||||
let s:completers = [s:bib, s:ref, s:img, s:inc, s:glc]
|
let s:completers = [s:bib, s:ref, s:img, s:inc, s:gls]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
@ -374,16 +374,16 @@ endfunction
|
|||||||
" }}}1
|
" }}}1
|
||||||
" {{{1 Glossary
|
" {{{1 Glossary
|
||||||
|
|
||||||
let s:glc = {
|
let s:gls = {
|
||||||
\ 'pattern' : '\v\\glc\s*\{[^}]*',
|
\ 'pattern' : '\v\\gls\s*\{[^}]*',
|
||||||
\ 'enabled' : 1,
|
\ 'enabled' : 1,
|
||||||
\}
|
\}
|
||||||
|
|
||||||
function! s:glc.complete(regex) dict " {{{2
|
function! s:gls.complete(regex) dict " {{{2
|
||||||
return self.parse_glossaries()
|
return self.parse_glossaries()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:glc.parse_glossaries() dict " {{{2
|
function! s:gls.parse_glossaries() dict " {{{2
|
||||||
let self.candidates = []
|
let self.candidates = []
|
||||||
|
|
||||||
for l:line in filter(vimtex#parser#tex(b:vimtex.tex, 0),
|
for l:line in filter(vimtex#parser#tex(b:vimtex.tex, 0),
|
||||||
@ -392,7 +392,7 @@ function! s:glc.parse_glossaries() dict " {{{2
|
|||||||
call add(self.candidates, {
|
call add(self.candidates, {
|
||||||
\ 'word' : l:entries,
|
\ 'word' : l:entries,
|
||||||
\ 'abbr' : l:entries,
|
\ 'abbr' : l:entries,
|
||||||
\ 'menu' : ' [glc]',
|
\ 'menu' : ' [gls]',
|
||||||
\})
|
\})
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user