Skip to content

Editors ​

VS Code ​

The extension in editors/vscode gives .nova files syntax highlighting, and through the language server: errors as you type, the type or signature on hover, go to definition (F12), the outline, and formatting (Shift+Alt+F).

Build and install it with Vite+:

sh
cd editors/vscode
vp install
vp test                 # the grammar, and novac lsp through VS Code's own client library
vp run package          # makes nova-language-0.1.0.vsix
code --install-extension nova-language-0.1.0.vsix

The extension starts novac lsp. It finds novac on your PATH, or where the setting nova.server.path says.

Other editors ​

novac lsp is a standard Language Server Protocol server on standard input and output, so any editor with an LSP client can use it: Neovim, Helix, Emacs, Zed, Sublime Text. Configure it to run novac lsp for .nova files. The TextMate grammar in editors/vscode/syntaxes/nova.tmLanguage.json works in editors that accept TextMate grammars.

What the server does ​

Diagnosticsevery error and note of novac check, as you type
Hoverthe type of an expression; let/var and the type of a variable; a function's signature; a field's type
Go to definitionlocals, parameters, functions, methods, fields, structs, enums and interfaces in the file
Document symbolsthe outline: functions, structs with their fields and methods, enums, interfaces, constants
Formattingthe whole file, in novac fmt's style

A file that belongs to a package is checked with the package and its locked dependencies; any other file is checked on its own. The details are in Tooling §2.

Pre-1.0: the language and its tools are still changing.