πΏ Jump to symbols in your code with live preview, built-in fuzzy finding, and more. Inspired by Zed, it preserves symbol order while guiding you through your codebase. Supports LSP, Treesitter, ctags, and works across buffers and workspaces.
[!WARNING] π§ Beta: This plugin is in beta. Breaking changes may occur.
https://github.com/user-attachments/assets/a97ff3b1-8b25-4da1-b276-f623e37d0368
Module | Description |
---|---|
π·οΈ symbols | LSP symbols for current buffer |
π workspace | LSP workspace symbols, interactive, live preview |
π watchtower | Symbols from all open buffers (LSP or Treesitter) |
π©Ί diagnostics | Diagnostics for buffer or full workspace, live filter |
π call_hierarchy | Call hierarchy (in/out/both) for symbol |
π·οΈ ctags | ctags-based symbols (buffer or watchtower) |
πͺ ui_select | Wrapper for vim.ui.select with enhanced UI |
/xx
such as /fn
for fcuntions or /bf:
for buffer names if watchtower module.^__
to filter out Python's __init__
methods)Using lazy.nvim:
{
"bassamsdata/namu.nvim",
opts = {
global = { },
namu_symbols = { -- Specific Module options
options = {},
},
},
-- === Suggested Keymaps: ===
vim.keymap.set("n", "<leader>ss", ":Namu symbols<cr>", {
desc = "Jump to LSP symbol",
silent = true,
})
vim.keymap.set("n", "<leader>sw", ":Namu workspace<cr>", {
desc = "LSP Symbols - Workspace",
silent = true,
})
}
require "paq" {
"bassamsdata/namu.nvim"
}
require("mini.deps").add("bassamsdata/namu.nvim")
/fn
, /me
, etc.) and then start type like /fnmain
to filter more see demo/bf:buffer_name
see demo/bf:name:fn
(buffer and function) see demo/er
(errors), /wa
(warnings), /hi
(hints), /in
(info) see demotree_guides
or indent
[see pictures](## Display Styles)Key | Action |
---|---|
<CR> |
Select item |
<Esc> |
Close picker |
<C-n> |
Next item |
<C-p> |
Previous item |
<Tab> |
Toggle multiselect |
<C-a> |
Select all |
<C-l> |
Clear all |
<C-y> |
Yank symbol(s) |
<C-d> |
Delete symbol(s) |
<C-v> |
Open symbol in vertical split |
<C-h> |
Open symbol in horizontal split |
<C-o> |
Add symbol(s) to CodeCompanion chat |
-- in namu_symbols.options
movement = {
next = { "<C-n>", "<DOWN>" }, -- Support multiple keys
previous = { "<C-p>", "<UP>" }, -- Support multiple keys
close = { "<ESC>" }, -- close mapping
select = { "<CR>" }, -- select mapping
delete_word = {}, -- delete word mapping
clear_line = {}, -- clear line mapping
},
multiselect = {
enabled = false,
indicator = "β", -- or "β"β
keymaps = {
toggle = "<Tab>",
select_all = "<C-a>",
clear_all = "<C-l>",
untoggle = "<S-Tab>",
},
max_items = nil, -- No limit by default
},
custom_keymaps = {
yank = {
keys = { "<C-y>" }, -- yank symbol text
},
delete = {
keys = { "<C-d>" }, -- delete symbol text
},
vertical_split = {
keys = { "<C-v>" }, -- open in vertical split
},
horizontal_split = {
keys = { "<C-h>" }, -- open in horizontal split
},
codecompanion = {
keys = "<C-o>", -- Add symbols to CodeCompanion
},
avante = {
keys = "<C-t>", -- Add symbol to Avante
},
},
Command | Arguments | Description |
---|---|---|
:Namu symbols |
function, class, method⦠| Show buffer symbols, filter by kind |
:Namu workspace |
Search workspace symbols | |
:Namu watchtower |
Symbols from all open buffers, it fallbacks to treesitter | |
:Namu diagnostics |
buffers, workspace | Diagnostics for buffer or workspace (not only open buffers) |
:Namu call in/out/both |
in/out/both | Call hierarchy for symbol |
:Namu ctags [watchtower] |
watchtower | ctags symbols (buffer or watchtower) |
:Namu help [topic] |
symbols/analysis | Show help |
You can check the configuration documentation for details on each option.
{ -- Those are the default options
"bassamsdata/namu.nvim",
opts = {
-- Enable symbols navigator which is the default
namu_symbols = {
enable = true,
---@type NamuConfig
options = {
AllowKinds = {
default = {
"Function",
"Method",
"Class",
"Module",
"Property",
"Variable",
-- "Constant",
-- "Enum",
-- "Interface",
-- "Field",
-- "Struct",
},
go = {
"Function",
"Method",
"Struct", -- For struct definitions
"Field", -- For struct fields
"Interface",
"Constant",
-- "Variable",
"Property",
-- "TypeParameter", -- For type parameters if using generics
},
lua = { "Function", "Method", "Table", "Module" },
python = { "Function", "Class", "Method" },
-- Filetype specific
yaml = { "Object", "Array" },
json = { "Module" },
toml = { "Object" },
markdown = { "String" },
},
BlockList = {
default = {},
-- Filetype-specific
lua = {
"^vim%.", -- anonymous functions passed to nvim api
"%.%.%. :", -- vim.iter functions
":gsub", -- lua string.gsub
"^callback$", -- nvim autocmds
"^filter$",
"^map$", -- nvim keymaps
},
-- another example:
-- python = { "^__" }, -- ignore __init__ functions
},
display = {
mode = "icon", -- "icon" or "raw"
padding = 2,
},
-- This is a preset that let's set window without really get into the hassle of tuning window options
-- top10 meaning top 10% of the window
row_position = "top10", -- options: "center"|"top10"|"top10_right"|"center_right"|"bottom",
preview = {
highlight_on_move = true, -- Whether to highlight symbols as you move through them
-- still needs implmenting, keep it always now
highlight_mode = "always", -- "always" | "select" (only highlight when selecting)
},
window = {
auto_size = true,
min_height = 1,
min_width = 20,
max_width = 120,
max_height = 30,
padding = 2,
border = "rounded",
title_pos = "left",
show_footer = true,
footer_pos = "right",
relative = "editor",
style = "minimal",
width_ratio = 0.6,
height_ratio = 0.6,
title_prefix = "σ± ¦ ",
},
debug = false,
focus_current_symbol = true,
auto_select = false,
initially_hidden = false,
multiselect = {
enabled = true,
indicator = "β", -- or "β"β
keymaps = {
toggle = "<Tab>",
untoggle = "<S-Tab>",
select_all = "<C-a>",
clear_all = "<C-l>",
},
max_items = nil, -- No limit by default
},
actions = {
close_on_yank = false, -- Whether to close picker after yanking
close_on_delete = true, -- Whether to close picker after deleting
},
movement = {-- Support multiple keys
next = { "<C-n>", "<DOWN>" },
previous = { "<C-p>", "<UP>" },
close = { "<ESC>" }, -- "<C-c>" can be added as well
select = { "<CR>" },
delete_word = {}, -- it can assign "<C-w>"
clear_line = {}, -- it can be "<C-u>"
},
custom_keymaps = {
yank = {
keys = { "<C-y>" },
desc = "Yank symbol text",
},
delete = {
keys = { "<C-d>" },
desc = "Delete symbol text",
},
vertical_split = {
keys = { "<C-v>" },
desc = "Open in vertical split",
},
horizontal_split = {
keys = { "<C-h>" },
desc = "Open in horizontal split",
},
codecompanion = {
keys = "<C-o>",
desc = "Add symbol to CodeCompanion",
},
avante = {
keys = "<C-t>",
desc = "Add symbol to Avante",
},
},
icon = "σ± ¦", -- σ± ¦ -  - ο -- σ°
kindText = {
Function = "function",
Class = "class",
Module = "module",
Constructor = "constructor",
Interface = "interface",
Property = "property",
Field = "field",
Enum = "enum",
Constant = "constant",
Variable = "variable",
},
kindIcons = {
File = "σ°",
Module = "σ°",
Namespace = "σ°",
Package = "σ°",
Class = "σ°",
Method = "σ°§",
Property = "σ°’",
Field = "σ°’",
Constructor = "σ°§",
Enum = "σ°»",
Interface = "σ°",
Function = "σ°",
Variable = "σ°«",
Constant = "σ°Ώ",
String = "σ°¬",
Number = "σ° ",
Boolean = "σ°¨",
Array = "σ°
ͺ",
Object = "σ°
©",
Key = "σ°",
Null = "σ°’",
EnumMember = "σ°»",
Struct = "σ°",
Event = "σ°",
Operator = "σ°",
TypeParameter = "σ°",
},
highlight = "NamuPreview",
highlights = {
parent = "NamuParent",
nested = "NamuNested",
style = "NamuStyle",
},
kinds = {
prefix_kind_colors = true,
enable_highlights = true,
highlights = {
PrefixSymbol = "NamuPrefixSymbol",
Function = "NamuSymbolFunction",
Method = "NamuSymbolMethod",
Class = "NamuSymbolClass",
Interface = "NamuSymbolInterface",
Variable = "NamuSymbolVariable",
Constant = "NamuSymbolConstant",
Property = "NamuSymbolProperty",
Field = "NamuSymbolField",
Enum = "NamuSymbolEnum",
Module = "NamuSymbolModule",
},
},
}
}
ui_select = { enable = false }, -- vim.ui.select() wrapper
}
end,
}
^test_
for test functions)<CR>
to jump, <Esc>
to cancelhttps://github.com/user-attachments/assets/2f84f1b0-3fb7-4d69-81ea-8ec70acb5b80
:Namu symbols function
/fn
for fucntion , /me
for methods, etc.https://github.com/user-attachments/assets/bb2a14da-cba0-4ae7-b826-4ceb1c828b79
https://github.com/user-attachments/assets/e548c3ea-6cdb-4f20-9569-175c57b31039
/bf:buffer_name
/bf:name:fn
https://github.com/user-attachments/assets/76c637d2-30d3-4f54-9290-510a51dcbe7e
/er
, /wa
, /hi
, /in
https://github.com/user-attachments/assets/02dc0ce5-c87a-445f-a477-ac4f411c6592
:Namu call in
, :Namu call out
, :Namu call both
https://github.com/user-attachments/assets/5d30214a-a5d8-46e3-89d4-be71203501e7
:Namu ctags
, :Namu ctags watchtower
https://github.com/user-attachments/assets/09ccc178-c067-45bb-8f86-3f8aa183e69d
options.display.format = "tree_guides"
:
options.display.format = "indent"
:
Group | Description |
---|---|
NamuPrefix | Prefix highlight |
NamuMatch | Matched characters in search |
NamuFilter | Filter prompt |
NamuPrompt | Prompt window |
NamuSelected | Selected item in multiselect |
NamuFooter | Footer text |
NamuCurrentItem | Current item highlight |
NamuPrefixSymbol | Symbol prefix |
LSP KINDS HIGHLIGHTS | ----------------- |
NamuSymbolFunction | Function symbol |
NamuSymbolMethod | Method symbol |
NamuSymbolClass | Class symbol |
NamuSymbolInterface | Interface symbol |
NamuSymbolVariable | Variable symbol |
NamuSymbolConstant | Constant symbol |
NamuSymbolProperty | Property symbol |
NamuSymbolField | Field symbol |
NamuSymbolEnum | Enum symbol |
NamuSymbolModule | Module symbol |
Some Other Styles | -------------------- |
NamuTreeGuides | Tree guide lines |
NamuFileInfo | File info text |
NamuPreview | Preview window highlight |
NamuParent | Parent item highlight |
NamuNested | Nested item highlight |
NamuStyle | Style elements highlight |
NamuCursor | Cursor highlight during Picker active |
I made this plugin for fun at first and didn't know I could replicate what Zed has, and to be independent and free from any pickers. Pull requests are welcome! Just please be kind and respectful. Any suggestions to improve and integrate with other plugins are also welcome.
βNamuβ means βtreeπ³β in Korean, just like how it helps you navigate the structure of your code.
getchar()
, without which this plugin wouldn't exist.