Computer Things
by Erik Hanson

Extensions for Panic's Nova Editor

Nova

Nova is a code editor written by Panic, the makers of your favorite FTP app.

I’ve written several extensions for Nova. A few of them have also been ported to other editors by me or by other people.

Copy Path

This extension copies the absolute or relative path of the current file, optionally including the line number and column number.

Read more in the readme, or open it directly in Nova itself.

Document Sections

Sometimes, despite your best efforts, a document gets very large and hard to navigate, and for whatever reason, the language server can't help you navigate. This extension provides commands to let you go to a specific section of a document, or to go to the previous or next section. A section is defined by a line of text that starts with a section indicator, optionally followed by some text terminated by a newline.

Read more in the readme, or open it directly in Nova itself.

Elixir Manual Formatter

Sometimes the ElixirLS extension fails to automatically format one or all files. This extension provides a command to format the current file, and a command to format all files. It intentionally doesn't try to format on save because the ElixirLS extension normally does that correctly.

Read more in the readme, or open it directly in Nova itself.

Go To Tab

This extension shows a list of open editors and lets you choose one to go to.

Read more in the readme, or open it directly in Nova itself.

Open File at Path

This extension opens a palette into which you can type a file path and optionally line number and column number. The palette will default to the first line of text from the clipboard. This is especially useful when you have a file path in some stack trace or test failure but you can't click on it because it's in a Report, or Nova doesn't recognize it because it has a line number and maybe a column number appended.

Read more in the readme, or open it directly in Nova itself.

Open Recent

Open Recent shows a list of recently-used editors and lets you choose one to open.

Read more in the readme, or open it directly in Nova itself.

Open Related File

This extension opens a file related to the current file. It's common for code editors to have a built-in or extension-provided feature to switch between a code file and its test, using some heuristics that work most of the time. Some editors and extensions will also try to jump to other kinds of related files, such as CSS files. In my experience, these tools find the related files often enough to sound promising, but are frustrating in practice because they don't work 100% of the time, or don't work on entire types of files.

This extension allows authors to specify each related file using a simple syntax. The upside is that the extension works perfectly all the time. The downside is that the author has to list each related file and has to update them when files move. To specify a related file, add an annotation somewhere in the file (perhaps in a comment).

The annotation must start with “@related” and contain one or more Markdown-style links in the form “[name](file-path)”, where “name” is any string and “file-path” is a path to the file, relative to the project root.

Read more in the readme, or open it directly in Nova itself.

Smart Sort Lines

This extension sorts lines of code with a little bit of intelligence when sorting a multi-line, comma-separated list. If all but the last line of text end with a comma, then after sorting, all but the last line of text will still end with a comma.

Read more in the readme, or open it directly in Nova itself.

Trail

This extension lets you create a trail of editor positions as you navigate code so that you can easily get back to where you came from. As you navigate your code, push waypoints onto Trail’s stack with the "Push Waypoint" command. Then when you want to get back to where you came from, pop the last waypoint off of Trail’s stack with the "Pop Waypoint" command which will move the text cursor to the file, line, and column that you previously pushed. If you want to pop multiple waypoints at once, use "Pop To Waypoint" which will show you the entire stack to of waypoints to choose from.

Read more in the readme, or open it directly in Nova itself.