Skip to content

Commit 14af70e

Browse files
gwuenlervag
authored andcommitted
fix: allow lambdas and Lua functions as doc handlers
When `g:vimtex_doc_handlers` holds a lambda expression or bare Lua function, the iterator itself will become a Funcref. To avoid E704, this Funcref variable name must start with a capital letter.
1 parent 29c84ce commit 14af70e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/vimtex/doc.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ function! vimtex#doc#package(word) abort " {{{1
3232
let l:context = vimtex#doc#get_context(a:word)
3333
if empty(l:context) | return | endif
3434

35-
for l:handler in g:vimtex_doc_handlers
35+
for l:Handler in g:vimtex_doc_handlers
3636
try
37-
if call(l:handler, [l:context]) | return | endif
37+
if call(l:Handler, [l:context]) | return | endif
3838
catch /E117/
3939
endtry
4040
endfor

0 commit comments

Comments
 (0)