NORMAL ~/wkd/p/gopath :set skin=modern utf-8

gopath.nvim

One key, and you are at the file the cursor is pointing at — however that reference happens to be written. gopath.nvim resolves symbols, require() paths and arbitrary file references under the cursor through a multi-phase pipeline, so a require("a.b"), a bare path, a :help tag and a stack-trace line all end in the same place: the right file, at the right line.

status
beta — Beta stage — active development. This repository is past its first shape and in active use, but the surface is not frozen: breaking changes are still possible. Pin a commit or tag if you depend on it.
category
Files & navigation
neovim
0.10+
repo
github.com/StefanBartl/gopath.nvim
commits
202
help
:help gopath

demo

recorded with VHS from demos/gopath.tape in a clean Neovim — re-recorded weekly
what is shown when
  1. gP - open path:line:col under the cursor, right there
  2. g\ - the same, in a vertical split
  3. g? - the resolution chain, when a jump goes somewhere odd

install

{
  "StefanBartl/gopath.nvim",
  opts = {},
}

docs/

git log

  1. fix env-shorten: bare-path lookup review fixes
  2. feat env-shorten: prefix bare relative paths found below $REPOS_DIR / known dirs
  3. feat api: shorten_path(abs) shortens one absolute path to its $VAR form
  4. docs api: resolve_text's exists means regular file, not on disk
  5. feat api: expose resolve_text as public top-level API
  6. feat menu: integrations.ui_menu switch + enabled() for ui.nvim's right-click menu
  7. fix env-shorten: never treat a URL as a relative path to resolve
  8. feat env-shorten: visual range + relative Markdown-link resolution
  9. fix bugs and inefficiencies found reviewing this session's commits
  10. feat menu: gopath.integrations.menu, a right-click "Paths" entry
  11. feat probe: reveal a (partial) selection in filetree.nvim / the file manager
  12. feat probe: resolve a partial selection of a $VAR ref or URL directly

keys

j / k
next / previous line
gg / G
first / last line
⏎
open the line under the cursor
/
search the plugins
:
command line — Tab completes
:help x
vimdoc of a plugin (:e x = plugin page)
:ls · :log · :stack
plugin list · activity stream · dependency graph
:colo x
colorscheme
:set skin=
modern | tui
?
this help
esc
close