https://github.com/wsdjeg/ctags.nvim
ctags integration for neovim
https://github.com/wsdjeg/ctags.nvim
neovim-plugin
Last synced: 24 days ago
JSON representation
ctags integration for neovim
- Host: GitHub
- URL: https://github.com/wsdjeg/ctags.nvim
- Owner: wsdjeg
- License: gpl-3.0
- Created: 2025-03-23T07:22:16.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-04-02T08:18:37.000Z (about 2 months ago)
- Last Synced: 2025-04-02T09:27:29.721Z (about 2 months ago)
- Topics: neovim-plugin
- Language: Lua
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ctags.nvim
ctags integration for neovim
## Installation
```lua
require('plug').add({
{
'wsdjeg/ctags.nvim',
config = function()
require('ctags').setup({})
end,
depends = {
{
'wsdjeg/job.nvim',
},
},
},
})
```
## Usagegenerate tag files when project changed:
```lua
require('plug').add({
{
'wsdjeg/ctags.nvim',
config = function()
require('rooter').reg_callback(require('ctags').update)
end,
depends = {
{
'wsdjeg/job.nvim',
},
{
'wsdjeg/rooter.nvim',
},
},
},
})
```update `vim.o.tags` options when project change:
```lua
require('plug').add({
{
'wsdjeg/ctags.nvim',
config = function()
require('ctags').setup()local function update_ctags_option()
local project_root = vim.fn.getcwd()
local dir = require('ctags.util').unify_path(require('ctags.config').cache_dir)
.. require('ctags.util').path_to_fname(project_root)
local tags = vim.tbl_filter(function(t)
return not vim.startswith(
t,
require('ctags.util').unify_path(require('ctags.config').cache_dir)
)
end, vim.split(vim.o.tags, ','))
table.insert(tags, dir .. '/tags')
vim.o.tags = table.concat(tags, ',')
end
end,
depends = {
{
'wsdjeg/job.nvim',
},
},
},
})
```