You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have realized Below description is not correct. I had done a lot of testing involving Cscope-maps as well an also quite tired when writing it up. My brain must have mixed up different testcases.
I will try to clarify.
Described behaviour was with relative paths in cscope.files, NOT full paths! Full paths makes gutentags to fail creating cscope db files all together. That is because gutentags prepends CWD to all paths internally and therefore can't find any files.
A request is to have a setting to disable this prepending of the CWD.
Below behavior is due to an issue with Cscope-maps (and no, it did not run fine as stated below), I will file an issue for that on their github.
I am sorry for the total confusion I may have caused.
When trying to open an #include file that is lokated outside project, full path in cscope.files and tagfiles (tags, cscope.out), the CWD getts appended to the full path and an emty buffer is opend. The path shown in the quickfix list is the full path without the appended CWD.
Files within the project, also full path in cscope.files and tagfiles, only show relative path in quickfix list (despite above) and open correctly.
Doesn't matter if cache dir is used or not.
Running cscope from terminal or with Cscope-maps (vim-gutentags disabled) works fine, also full paths in cscope.files and tagfiles.
init.vim:
" gutentags --------------------------
let g:gutentags_enabled=0
let g:gutentags_define_advanced_commands = 1
let g:gutentags_trace=1
let g:gutentags_modules=['ctags', 'cscope_maps']
let g:gutentags_add_default_project_roots=0
let g:gutentags_project_root=['.root']
let g:gutentags_cache_dir=expand('~/.cache/tags')
let g:gutentags_file_list_command = 'cat cscope.files|tr -d "'
let g:gutentags_ctags_extra_args=['-R', '--tag-relative=yes', '--exclude=build','--fields=+ailmnSER', '--kinds-C++=+lp', '--kinds-C=+lp', '--extras=+frq']
let g:gutentags_cscope_build_inverted_index=1
let g:gutentags_cscope_build_inverted_index_maps=1
let g:gutentags_generate_on_new=1
let g:gutentags_generate_on_missing=1
let g:gutentags_generate_on_write=1
let g:gutentags_generate_on_empty_buffer=0
let g:gutentags_plus_switch=0
let g:gutentags_plus_nomap=1
(the cscope.files has " enclosing the paths, hence 'tr -d "' above)
The text was updated successfully, but these errors were encountered:
EDIT
I have realized Below description is not correct. I had done a lot of testing involving Cscope-maps as well an also quite tired when writing it up. My brain must have mixed up different testcases.
I will try to clarify.
Described behaviour was with relative paths in cscope.files, NOT full paths! Full paths makes gutentags to fail creating cscope db files all together. That is because gutentags prepends CWD to all paths internally and therefore can't find any files.
A request is to have a setting to disable this prepending of the CWD.
Below behavior is due to an issue with Cscope-maps (and no, it did not run fine as stated below), I will file an issue for that on their github.
I am sorry for the total confusion I may have caused.
When trying to open an #include file that is lokated outside project, full path in cscope.files and tagfiles (tags, cscope.out), the CWD getts appended to the full path and an emty buffer is opend. The path shown in the quickfix list is the full path without the appended CWD.
Files within the project, also full path in cscope.files and tagfiles, only show relative path in quickfix list (despite above) and open correctly.
Doesn't matter if cache dir is used or not.
Running cscope from terminal or with Cscope-maps (vim-gutentags disabled) works fine, also full paths in cscope.files and tagfiles.
Termux: 0.118.1
Neovim: v0.10.1
Universal Ctags: 6.1.0
Cscope: 15.9
cscope_maps: from 2024-09-24
vim-gutentags: well, latest
init.vim:
" gutentags --------------------------
let g:gutentags_enabled=0
let g:gutentags_define_advanced_commands = 1
let g:gutentags_trace=1
let g:gutentags_modules=['ctags', 'cscope_maps']
let g:gutentags_add_default_project_roots=0
let g:gutentags_project_root=['.root']
let g:gutentags_cache_dir=expand('~/.cache/tags')
let g:gutentags_file_list_command = 'cat cscope.files|tr -d "'
let g:gutentags_ctags_extra_args=['-R', '--tag-relative=yes', '--exclude=build','--fields=+ailmnSER', '--kinds-C++=+lp', '--kinds-C=+lp', '--extras=+frq']
let g:gutentags_cscope_build_inverted_index=1
let g:gutentags_cscope_build_inverted_index_maps=1
let g:gutentags_generate_on_new=1
let g:gutentags_generate_on_missing=1
let g:gutentags_generate_on_write=1
let g:gutentags_generate_on_empty_buffer=0
let g:gutentags_plus_switch=0
let g:gutentags_plus_nomap=1
(the cscope.files has " enclosing the paths, hence 'tr -d "' above)
The text was updated successfully, but these errors were encountered: