Neovim / code navigation
Install NamuNavigate your code
with context.
Find symbols, follow calls, and explore diagnostics in a picker that keeps your code in view.
Try the picker
Interactive exampleType to filter. Press ; or use the button to show jump labels, then press a label to select its symbol.
Jump labels are enabled by default. Thanks to @themastersheep for implementing them.
Installation
A small setup. Useful defaults.
vim.pack.add({
{ src = "https://github.com/bassamsdata/namu.nvim" },
})
require("namu").setup({})
vim.keymap.set("n", "<leader>ss", "<cmd>Namu symbols<cr>", {
desc = "Namu symbols",
}){
"bassamsdata/namu.nvim",
cmd = "Namu",
main = "namu",
opts = {},
keys = {
{ "<leader>ss", "<cmd>Namu symbols<cr>", desc = "Namu symbols" },
},
}Open a file with an attached language server and run :Namu symbols. Tree guides and manual jump labels are ready to use.
Choose your view
From one symbol to the whole workspace.
Keep your hands on the keys
Filter, preview, select, act.
| Ctrl n / ↓ | Next item |
| Ctrl p / ↑ | Previous item |
| Enter | Select item |
| ; | Toggle jump labels |
| Esc | Leave jump mode, then close |
| Tab / Shift Tab | Select / unselect |
| Ctrl a / Ctrl l | Select all / clear selection |
| Ctrl y | Yank symbol text |
| Ctrl d | Delete symbol text |
| Ctrl v / Ctrl h | Vertical / horizontal split |
| Ctrl q | Send to quickfix |
| Ctrl o | Add to CodeCompanion |
| Ctrl t | Add to Avante |
Actions depend on the picker. CodeCompanion and Avante require their corresponding plugins.
Make it your own
Shared settings, with overrides for each picker.
Put shared options under global. Use a module such as namu_symbols to tune that picker. Your module settings take precedence.
require("namu").setup({
global = {
display = { format = "tree_guides" },
jump = {
enabled = true,
toggle_key = ";",
auto_activate = false,
},
},
namu_symbols = {
window = { max_width = 100 },
},
ui_select = { enable = false },
})A selection you can see
Namu checks the focused row's contrast, uses your theme's selection colors when needed, and derives a background as a fallback. Custom highlights take precedence.
Customize highlightsA tree for your code.
Inspired by Zed. Made for Neovim.