4.5 KiB
4.5 KiB
gentags.nvim
Tags generator/management for old school vimers in Neovim.
Table of Contents
Features
- Support both workspace/single file.
- Incremental update on file save.
- Disk cache management and garbage collection.
- Async run & terminate immediately on nvim leave.
- Real-time status for Neovim components such as statusline.
Install
Requirements:
- Neovim ≥ 0.7.0.
- universal-ctags (default backend).
PRs are welcome to add other backends.
With lazy.nvim
require("lazy").setup({
{
"linrongbin16/gentags.nvim",
config = function()
require('gentags').setup()
end,
},
})
With pckr.nvim
require("pckr").add({
{
"linrongbin16/gentags.nvim",
config = function()
require("gentags").setup()
end,
},
})
Usage
Gentags will automatically run below jobs in backend when you work in the nvim editor:
- Load a tags for the whole worksapce or the single file on first open a file.
- Generate tags for the whole worksapce or the single file on first open a file.
- Update tags after you save writtens on a file.
- Terminate all background child processes when you leave nvim.
By default all tags are generated in stdpath('cache') . '/gentags.nvim' directory.
- For UNIX/Linux:
~/.cache/nvim/gentags.nvim. - For Windows:
$env:USERPROFILE\AppData\Local\Temp\nvim\gentags.nvim.
Configuration
To configure default options, please use:
require('gentags').setup(opts)
The otps is an optional lua table that overwrites default options.
For complete options and defaults, please see configs.lua.
Alternatives
Development
To develop the project and make PR, please setup with:
To run unit tests, please install below dependencies:
Then test with vusted ./test.
Contribute
Please open issue/PR for anything about gentags.nvim.
Like gentags.nvim? Consider