Skip to content

Using Herb with Nova

Use the Herb Language Server in Nova via the Herb LSP extension.

Community Plugin

The Nova extension is a community plugin built and maintained by Pat Allan. It is developed at pat/herb-lsp.novaextension and is not part of the Herb project.

Installation

First, install the Herb Language Server (v0.4.3 or newer) globally:

bash
npm install -g @herb-tools/language-server
bash
yarn global add @herb-tools/language-server
bash
yarn dlx -q @herb-tools/language-server --stdio
bash
pnpm add -g @herb-tools/language-server
bash
bun add -g @herb-tools/language-server

Then install the Herb LSP extension in Nova. Open Extensions → Extension Library..., search for "Herb LSP", and install it. Alternatively, install it directly from the Nova Extension Library.

Configuration

The extension works out of the box once the herb-language-server executable is found. Two settings are available, both at a global level and at a per-project level.

  • Additional PATH directories, so the extension can reliably detect the herb-language-server executable
  • Auto-formatting of ERB files when they're saved

To configure global preferences, open Extensions → Extension Library... and select the Preferences tab of the Herb LSP extension. Per-project preferences are available under Project → Project Settings....

If you use a version manager like mise, asdf, or nvm, add the directory containing the herb-language-server executable (or its shims) to the extension's PATH setting. For example, with mise:

/Users/[username]/.local/share/mise/shims

Troubleshooting

Ensure the language server is installed and in your PATH:

bash
which herb-language-server

If the executable can't be found, add its directory to the extension's PATH setting as described above.

If the language server crashes or stops responding, run the Restart Herb LSP command from Nova's command palette.

Other editors

If you are looking to use Herb in another editor, check out the instructions on the editor integrations page.

Resources

Released under the MIT License.