# gentags.nvim
Tags generator/management for old school vimers in Neovim.
To be honest, it seems that tags have become useless in Neovim today, LSP and treesitter replaced tags and make (Neo)vim a modern editor.
While there exists gap when LSP server or treesitter implementations are insufficient, which brings tags back to us as a supplement to fill the gap.
## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Install](#install)
- [Configuration](#configuration)
- [Recommendations](#recommendations)
- [Alternatives](#alternatives)
- [Development](#development)
- [Contribute](#contribute)
## Features
- [x] Automatically running in background.
- [x] Support both workspace/single file mode.
- [x] Full update on workspace open, incremental update on file save.
- [x] Terminate immediately on nvim leave.
- [x] Search and load tags on workspace/file open.
- [ ] Disk cache management and garbage collection.
- [ ] Real-time status for Neovim components such as statusline.
## Requirements
- Neovim ≥ 0.7.0.
- [universal-ctags](https://github.com/universal-ctags/ctags) (default backend).
PRs are welcome to add other backends.
## Install
With lazy.nvim
```lua
require("lazy").setup({
{
"linrongbin16/gentags.nvim",
config = function()
require('gentags').setup()
end,
},
})
```
With pckr.nvim
```lua
require("pckr").add({
{
"linrongbin16/gentags.nvim",
config = function()
require("gentags").setup()
end,
},
})
```
## Configuration
To configure default options, please use:
```lua
require('gentags').setup(opts)
```
The `otps` is an optional lua table that overwrites default options.
For complete options and defaults, please see [configs.lua](https://github.com/linrongbin16/gentags.nvim/tree/main/lua/gentags/configs.lua).
## Recommendations
Recommend use tags with below plugins to smooth your editing flow:
- [vista.vim](https://github.com/liuchengxu/vista.vim): View and search symbols on current file.
- [cmp-nvim-tags](https://github.com/quangnguyen30192/cmp-nvim-tags): Code completion data source for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp).
## Alternatives
- [gentags.lua](https://github.com/JMarkin/gentags.lua): Auto generates tags by filetype.
- [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags): A Vim plugin that manages your tag files.
## Development
To develop the project and make PR, please setup with:
- [lua_ls](https://github.com/LuaLS/lua-language-server).
- [stylua](https://github.com/JohnnyMorganz/StyLua).
- [luarocks](https://luarocks.org/).
- [luacheck](https://github.com/mpeterv/luacheck).
To run unit tests, please install below dependencies:
- [vusted](https://github.com/notomo/vusted).
Then test with `vusted ./test`.
## Contribute
Please open [issue](https://github.com/linrongbin16/gentags.nvim/issues)/[PR](https://github.com/linrongbin16/gentags.nvim/pulls) for anything about gentags.nvim.
Like gentags.nvim? Consider
[](https://github.com/sponsors/linrongbin16)
[](https://github.com/linrongbin16/lin.nvim/wiki/Sponsor)
[](https://github.com/linrongbin16/lin.nvim/wiki/Sponsor)