Universal-Ctags packaged as an installable snap for Linux
Ctags parses source code to produce an index file, mapping the names of
symbols, like functions, classes, and variables, to the locations where
they are defined. This index is used by editors like Vim and Emacs
to enable features like 'go to definition'.
Compared to universal-ctags installed using apt, or compiled from source,
this snap has some limitations, introduced by snap security restrictions.
Source files cannot be scanned if they are:
Outside the user's $HOME directory, or
In a top-level hidden directory in $HOME, eg. ~/.src.
Lower-level hidden directories, eg. ~/proj/.src, can be scanned.
Ctags usually reads config from the following directories:
The user's ~/.ctags.d/ is read as expected.
The current directory's ctags.d is not read by default,
but the '--options' arg can be used to read from it.
The current directory's .ctags.d cannot be read.
Configuration in other places, specified using --options
or --options-maybe, will not be read if they are outside the
user's HOME, or in a top-level hidden directory.
Tag files written using '-f' options or similar may not be outside
the user's $HOME directory, nor in a top-level hidden file or directory.
You may be able to work around this by using -f - and redirecting stdout
to the required location.
Swap out openSUSE_Leap_15.2 for openSUSE_Leap_15.1, openSUSE_Leap_15.0, or openSUSE_Tumbleweed if you’re using a different version of openSUSE.
With the repository added, import its GPG key:
sudo zypper --gpg-auto-import-keys refresh
Finally, upgrade the package cache to include the new snappy repository:
sudo zypper dup --from snappy
Snap can now be installed with the following:
sudo zypper install snapd
You then need to either reboot, logout/login or source /etc/profile to have /snap/bin added to PATH.
Additionally, enable and start both the snapd and the snapd.apparmor services with the following commands: