- Syntax highlighting for
.narifiles through the TextMate grammar inlsp/extension/syntaxes/. - Language configuration: brackets, comments, quotes, and related editor behavior.
nari-lspintegration over stdio.- Completion, hover, diagnostics, go-to-definition, references, document/workspace symbols, signature help, semantic tokens, code actions, and inlay hints as implemented by
lsp/lsp_server.cpp. - Debugging through the interpreter's DAP mode:
nari --dap. - Breakpoint support for
.narifiles.
pnpm i
pnpm buildThen open the repo in VS Code and run/debug the extension from that folder, or symlink/copy lsp/extension into your VS Code extensions directory while developing.
The extension looks for nari-lsp in this order:
- The
nari.lsp.serverPathsetting. build/debug/nari-lsporbuild/release/nari-lspunder any workspace folder.nari-lsponPATH.
The debugger looks for nari in this order:
- The
nari.debug.interpreterPathsetting. build/release/nariorbuild/debug/nariunder any workspace folder.narionPATH.
On Windows, the .exe variants are also checked.
{
"nari.lsp.enable": true,
"nari.lsp.serverPath": "/absolute/path/to/nari-lsp",
"nari.lsp.inlayHints": false,
"nari.debug.interpreterPath": "/absolute/path/to/nari"
}Leave the path settings empty to use auto-discovery.
{
"type": "nari",
"request": "launch",
"name": "Debug current Nari file",
"program": "${file}",
"stopOnEntry": true,
"args": []
}The current VS Code extension is development-ready but not yet a polished marketplace distribution. The main missing pieces are:
- explicit
onLanguage:nariactivation, - bundled or auto-installed
nari-lsp/ interpreter binaries, - marketplace release automation,
- extension versioning tied to Nari release artifacts,
- and broader DAP/LSP integration tests.
- Check that the file extension is
.nari. - Confirm the extension is installed or running in an Extension Development Host.
- Reload the VS Code window.
- Check
Output -> Log (Extension Host)for activation or grammar errors.
- Build the project so
nari-lspexists. - Set
nari.lsp.serverPathto an absolute path if auto-discovery fails. - Verify
nari.lsp.enableistrue. - Check
/tmp/nari-lsp.logon Linux for current development logs.
- Build the interpreter.
- Set
nari.debug.interpreterPathto an absolute path if auto-discovery fails. - Make sure your launch configuration uses
type: "nari"and pointsprogramat a.narior.naricfile.