Navigation bread crumbs?

One of my extension users is asking about a capability present in other editors. When navigating to a file (for example using Find References in my plugin, or Jump to Definition in the stock Nova LSP support), it would be very helpful to be able to navigate back to the previous location. (This is very useful when switching frequently between different files – and in larger projects there may be a lot files involved so the list of tabs is too daunting to really be so useful here.)

Is there already an editor capability here? Is there something we can do as extension authors to enable this?

A few days ago, I shipped an extension that brings up a list of recent files:

Does that do what you want?

(Also, I have unexpectedly not been at my computer since I shipped the extension, so I haven’t even tried using it in a real project, so there might be bugs :woman_shrugging: )

Not quite. It helps, but you really want to go to the same cursor offset – and it might even be the same cursor offset in the same file.

I really think this should be an editor builtin thing – sort of a navigation stack. I could probably build a stack myself if I need to… but ick.

1 Like

I did exactly that in my now-abandoned go extension, but is clumsy at best implemented that way. It really needs to hook into user navigation events that extensions don’t have access to. Ideally extensions should be able to push/pop the stack to cover edge cases the built in navigation actions don’t cover. I believe I’ve made a feature request by at least a couple channels. It really is my Most Desired missing feature of Nova. (Closely followed by find references, type definitions & implementations being supported out-of-box for language servers that implement those queries.)

1 Like