tagbar
tagbar copied to clipboard
Usage with ctags (installed with snap)
Hello,
Issue:
The /tmp
file use to cache the source before passing them to ctags
is out of reach for the ctags
program installed with snap
.
The plugin cannot be used consequently. The log shows that it cannot open the file in /tmp
and the snap page informs on this limitation (https://snapcraft.io/universal-ctags informs on the limitation).
A Solution?
The plugin vim-gutentags
solves this limitation with an option letting change the cache of the plugin to ~/tmp
for instance which is compatible with the security policy of snap (see: https://github.com/ludovicchabant/vim-gutentags/issues/267).
Is it something already known? Is there already a solution that I am not aware of?
Note: for the moment I use this workaround: not having cache files in .vimrc
let g:tagbar_use_cache = 0
Thanks
At the moment disabling the cache is the accepted work around. We'd be happy to accept a PR if you want to propose something better. See also #635.
Or just, you know, install ctags
to your actual system. Snap is a disaster for things like this and this isn't the only way it is problematic for tagbar.
@samuelsayag Can you try the tempname()
workaround listed in #723 to see if this helps your issue too?
PSA for anyone using snaps because that was the easy path on Ubuntu: As of Focal 20.04 (and of course Groovy 20.10) Ubuntu has Universal Ctags packages in the universe repos.