Skip to content
m7b-ioPublic

About

🦘 Interactive symbol finder

Topics

Resources

Contributing

Stars

11 stars

Watchers

0 watching

Forks

Repository files navigation

🦘 snav

Interactive symbol finder

IDE - Zed

zed.mp4

Terminal - Ghostty

ghostty.mp4

What is snav?

snav is a terminal UI for jumping to any symbols.

Type a query, pick a result, and open the exact file:line:col.

Why use it

  • Find functions, types, classes, constants, and more across the repo
  • Fuzzy-ranked results while you type
  • Syntax-highlighted preview before opening
  • Fast reopen with local cache
  • Works on macOS, Linux, and Windows

Supported languages

Syntax-highlighted preview currently supports:

  • Go
  • Rust
  • Zig
  • C#
  • Java
  • Kotlin
  • PHP
  • Ruby
  • Python
  • JavaScript
  • TypeScript
  • TSX
  • Swift
  • Bash
  • C
  • C++
  • JSON
  • YAML
  • TOML

Common config and markup files such as .env, .ini, .properties, .tf, .hcl, and .xml are also indexed with heuristic key matching, but do not have the same first-class language support as the list above.

Install

1) Install ripgrep

snav requires rg on your PATH.

2) Install snav

curl -fsSL https://raw.githubusercontent.com/m7b-io/snav/main/install | bash

Default install path: /usr/local/bin.

Update an existing install in place:

snav update

Optional local install path:

SNAV_INSTALL_DIR="$HOME/.local/bin" curl -fsSL https://raw.githubusercontent.com/m7b-io/snav/main/install | bash

By default, the installer auto-enforces signature verification when cosign is available.

Optional: enforce signature verification explicitly (requires cosign):

SNAV_REQUIRE_SIGNATURE=1 curl -fsSL https://raw.githubusercontent.com/m7b-io/snav/main/install | bash

Terminal usage

snav --root .

Keys:

  • Type to filter symbols
  • up/down or ctrl+p/ctrl+n: move
  • tab: toggle preview
  • enter: open selected result
  • ctrl+space: copy path:line:col
  • esc or ctrl+c: quit

Common flags

  • --exclude-tests: ignore common test files/directories
  • --no-ignore: include files ignored by .gitignore, .ignore, .rgignore
  • --theme github: set color theme
  • --highlight-context synthetic: use line-only highlighting
  • --editor-cmd "code --goto {target}": custom open command

Zed setup

1) Add a task

~/.config/zed/tasks.json:

[
  {
    "label": "snav",
    "command": "snav --exclude-tests --root $ZED_WORKTREE_ROOT",
    "use_new_terminal": false,
    "allow_concurrent_runs": false,
    "reveal": "always",
    "reveal_target": "center",
    "hide": "always",
    "shell": "system",
    "show_summary": false,
    "show_command": false
  }
]

2) Add a keybinding

~/.config/zed/keymap.json:

[
  {
    "context": "Workspace",
    "bindings": {
      "cmd-shift-t": [
        "task::Spawn",
        {
          "task_name": "snav"
        }
      ]
    }
  }
]

3) Use it

  • Press your keybinding
  • Jump around

Cache

snav keeps one local index cache for the most recent root and scan options. When settings match, cached results load first and a rescan refreshes in the background.

License

MIT - see LICENSE.

About

🦘 Interactive symbol finder

Topics

Resources

Contributing

Stars

11 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages