tagbar icon indicating copy to clipboard operation
tagbar copied to clipboard

Usage with ctags (installed with snap)

Open samuelsayag opened this issue 3 years ago • 3 comments

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

samuelsayag avatar Nov 26 '20 14:11 samuelsayag

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.

alerque avatar Nov 27 '20 10:11 alerque

@samuelsayag Can you try the tempname() workaround listed in #723 to see if this helps your issue too?

raven42 avatar Jan 11 '21 13:01 raven42

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.

alerque avatar Feb 18 '21 07:02 alerque