A Neovim plugin that enables click-to-navigate functionality for ctags, allowing you to jump to symbol definitions by simply clicking on them instead of using Ctrl-]. And then navigating back by clicking on the same symbol again instead of using Ctrl-T.
This is mainly good for reading code on Android using Termux. It normally takes many clicks on Android to do Ctrl-] or Ctrl-T, or to exit and open files -- with this plugin it's just a single tap, which makes the code reading experience much smoother.
- Single-click navigation to tag definitions
- Smart back navigation - click the same symbol to go back
- Navigation history stack
- Easy enable/disable commands
- Lightweight and fast
Just clone the repository and put this in your init.vim file (edit the repository path):
set runtimepath^=/path/to/repo/nvim-ctagtap
lua require("nvim-ctagtap").setup()
Other installation methods like package managers might work but are not officially supported (yet).
The plugin can be set up with minimal configuration:
require("nvim-ctagtap").setup()Or with custom maximum history size:
require("nvim-ctagtap").setup({
max_history = 100, -- Maximum number of navigation entries to keep (default: 100)
}):CtagTapEnable- Enable click-to-navigate functionality:CtagTapDisable- Disable click-to-navigate functionality:CtagTapToggle- Toggle click-to-navigate functionality:CtagTapHistory- Show navigation history:CtagTapClearHistory- Clear navigation history
By default, the plugin auto-enables when Neovim starts. To disable auto-enable, set:
vim.g.nvim_ctagtap_auto_enable = falseThen manually enable with :CtagTapEnable when needed.
- Neovim 0.7.0 or later
- ctags installed and configured
- A tags file generated (e.g.,
ctags -R .)
- When you click on a symbol, the plugin moves the cursor to that position
- It navigates using ctags (equivalent to
Ctrl-]) - The navigation is saved in a history stack
- Clicking on the same symbol at the destination navigates back to the source (equivalent to
Ctrl-T)
MIT