This is a stripped down version of Andrew Orsts' Tagbar.kak script. It
displays tags for the current buffer in a new *tagbuf*
buffer instead
of a new Kak client in a separate window or tmux pane. It also does not
automatically update, you must call the tagbuf
command to generate a new
list of tags. It uses ctags to generate tags for current buffer, and
readtags to display them.
With plug.kak
Add this snippet to your kakrc
:
plug "mogenson/tagbuf.kak"
Clone this repo, and place tagbuf.kak
to your autoload directory, or source it
manually.
For this plugin to function, you need working ctags and readtags programs. Note that readtags isn't shipped with older ctags implementations. universal-ctags is recommended.
Tagbuf.kak supports configuration via these options:
tagbuf_sort
- affects tags sorting method in sections of the tagbuf buffertagbuf_display_anon
- affects displaying of anonymous tagstagbuf_ctags_cmd
- command used to generate tags file (default:ctags
)
Tagbuf.kak provides one command:
tagbuf
- create or update the*tagbuf*
buffer
In *tagbuf*
buffer you can use Ret key to jump to the definition of
the tag.