Skip to content

Commit faf6c86

Browse files
committed
update readme
1 parent 950cfdf commit faf6c86

File tree

1 file changed

+58
-10
lines changed

1 file changed

+58
-10
lines changed

README.md

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
11
# ctags.nvim
22

3-
ctags integration for neovim
3+
A lightweight Neovim plugin that integrates ctags with Neovim.
4+
It provides automatic tag generation, updates your tags option, and offers a simple async workflow powered by job.nvim.
45

5-
## Installation
6+
[![GitHub License](https://img.shields.io/github/license/wsdjeg/ctags.nvim)](LICENSE)
7+
[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/wsdjeg/ctags.nvim)](https://github.com/wsdjeg/ctags.nvim/issues)
8+
[![GitHub commit activity](https://img.shields.io/github.amrom.workers.devmit-activity/m/wsdjeg/ctags.nvim)](https://github.com/wsdjeg/ctags.nvim/commits/master/)
9+
[![GitHub Release](https://img.shields.io/github/v/release/wsdjeg/ctags.nvim)](https://github.com/wsdjeg/ctags.nvim/releases)
10+
11+
<!-- vim-markdown-toc GFM -->
12+
13+
- [✨ Features](#-features)
14+
- [📦 Installation](#-installation)
15+
- [⚙️ Basic Usage](#-basic-usage)
16+
- [🔧 Configuration](#-configuration)
17+
- [📄 License](#-license)
18+
19+
<!-- vim-markdown-toc -->
20+
21+
## ✨ Features
22+
23+
- Automatically generate or update tags files for the current project.
24+
- Asynchronously run ctags (via job.nvim) without blocking the editor.
25+
- Dynamically update vim.o.tags so Neovim can locate the correct tags file.
26+
- Works seamlessly with project-root managers such as rooter.nvim.
27+
- Supports all languages supported by Universal Ctags.
28+
- Optional debug logging with logger.nvim.
29+
30+
## 📦 Installation
31+
32+
Using [nvim-plug](https://github.com/wsdjeg/nvim-plug)
633

734
```lua
835
require('plug').add({
936
{
1037
'wsdjeg/ctags.nvim',
11-
config = function()
12-
require('ctags').setup({})
13-
end,
1438
depends = {
1539
{
1640
'wsdjeg/job.nvim',
@@ -20,9 +44,9 @@ require('plug').add({
2044
})
2145
```
2246

23-
## Usage
47+
## ⚙️ Basic Usage
2448

25-
generate tag files when project changed:
49+
Auto-update tags when project root changes:
2650

2751
```lua
2852
require('plug').add({
@@ -65,19 +89,21 @@ require('plug').add({
6589
table.insert(tags, dir .. '/tags')
6690
vim.o.tags = table.concat(tags, ',')
6791
end
92+
require('rooter').reg_callback(update_ctags_option)
6893
end,
6994
depends = {
7095
{
7196
'wsdjeg/job.nvim',
7297
},
98+
{
99+
'wsdjeg/rooter.nvim',
100+
},
73101
},
74102
},
75103
})
76104
```
77105

78-
## Debug
79-
80-
debug ctags.nvim with logger.nvim
106+
Enable debugging:
81107

82108
```lua
83109
require('plug').add({
@@ -100,3 +126,25 @@ require('plug').add({
100126
},
101127
})
102128
```
129+
130+
## 🔧 Configuration
131+
132+
All configuration is done through:
133+
134+
```lua
135+
require('ctags').setup({
136+
cache_dir = vim.fn.stdpath('data') .. '/ctags.nvim/',
137+
})
138+
```
139+
140+
Available Options (examples):
141+
142+
| Option | Type | Description |
143+
| ---------------- | ------- | ------------------------------------------------ |
144+
| cache_dir | string | Directory where generated tag files are stored. |
145+
146+
<!-- ## 🧠 Tips -->
147+
148+
## 📄 License
149+
150+
Licensed under GPL-3.0.

0 commit comments

Comments
 (0)