Error on :GOTOIMPL
oncer opened this issue · comments
I believe I have everything set up correctly, however I'm getting the following error when I execute :GOTOIMPL on a method declaration in a header file:
Error detected while processing function lh#cpp#GotoFunctionImpl#GrabFromHeaderPasteInSource[39]..<SNR>163_BuildFunctionSignature4impl[57]..lh#dev#start_tag_session[6]..lh#dev#__BuildCrtBufferCtags:
line 47:
E121: Undefined variable: ctags_has_end_of_functions
E15: Invalid expression: ctags_has_end_of_functions
Theoretically the variable should be defined here, in autoload/lh/dev.vim:
" Function: lh#dev#get_variables(function_boundaries [, split points ...]) {{{2
" NB: In C++, ctags does not understand for (int i=0...), and thus it can't
" extract "i" as a local variable ...
" @note depend on tags
if lh#tags#ctags_flavour() =~ 'utags'
let c_ctags_understands_local_variables_in_one_pass = 1
let cpp_ctags_understands_local_variables_in_one_pass = 1
let ctags_has_end_of_functions = 1
else
let c_ctags_understands_local_variables_in_one_pass = 0
let cpp_ctags_understands_local_variables_in_one_pass = 0
let ctags_has_end_of_functions = 0
endif
For some reason this does not happen, none of the three variables above is defined in my vim session. lh#tags#ctags_flavour() evaluates to "etags" on my system. I'm using VIM 8.1. Any ideas where this problem could be coming from?
I've recently completely rewritten lh-tags and this part of lh-dev which was depending on lh-tags.
At this time, I haven't validated the full stack, IOW, I cannot ensure :GOTOIMPL
will work correctly.
IIRC, lh-tags branch to use is named OO
, lh-dev branch is named OO-lhtags
. lh-cpp branch to use is stylev2
, and it'll require lh-style
plugin.
I'll try to speed up the (re)integration of the refactored core plugins. I cannot promise anything though. Let me know if you can (or cannot) use :GOTOIMPL
with these branches.
I've pushed the new versions in the master branches, let me know if this fixes the issue you've observe -- and if it introduces regressions.