Namu documentation

Neovim / code navigation

Install Namu

Navigate your code
with context.

Find symbols, follow calls, and explore diagnostics in a picker that keeps your code in view.

Live previewFuzzy filteringJump labelsTree guides

Try the picker

Interactive example
garden.luaSymbolsLUA
Namu symbols 5 items
garden.lua main1:1

Type 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.

01

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",
})

Open a file with an attached language server and run :Namu symbols. Tree guides and manual jump labels are ready to use.

02

Choose your view

From one symbol to the whole workspace.

03

Keep your hands on the keys

Filter, preview, select, act.

Navigation
Ctrl n / ↓Next item
Ctrl p / ↑Previous item
EnterSelect item
;Toggle jump labels
EscLeave jump mode, then close
Tab / Shift TabSelect / unselect
Ctrl a / Ctrl lSelect all / clear selection
Actions
Ctrl yYank symbol text
Ctrl dDelete symbol text
Ctrl v / Ctrl hVertical / horizontal split
Ctrl qSend to quickfix
Ctrl oAdd to CodeCompanion
Ctrl tAdd to Avante

Actions depend on the picker. CodeCompanion and Avante require their corresponding plugins.

04

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 highlights

A tree for your code.

Inspired by Zed. Made for Neovim.

Explore on GitHub