Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

vscode-nari

Features

  • Syntax highlighting for .nari files through the TextMate grammar in lsp/extension/syntaxes/.
  • Language configuration: brackets, comments, quotes, and related editor behavior.
  • nari-lsp integration 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 .nari files.

Development Setup

pnpm i
pnpm build

Then 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:

  1. The nari.lsp.serverPath setting.
  2. build/debug/nari-lsp or build/release/nari-lsp under any workspace folder.
  3. nari-lsp on PATH.

The debugger looks for nari in this order:

  1. The nari.debug.interpreterPath setting.
  2. build/release/nari or build/debug/nari under any workspace folder.
  3. nari on PATH.

On Windows, the .exe variants are also checked.

Useful Settings

{
  "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.

Example Debug Configuration

{
  "type": "nari",
  "request": "launch",
  "name": "Debug current Nari file",
  "program": "${file}",
  "stopOnEntry": true,
  "args": []
}

Packaging Status

The current VS Code extension is development-ready but not yet a polished marketplace distribution. The main missing pieces are:

  • explicit onLanguage:nari activation,
  • bundled or auto-installed nari-lsp / interpreter binaries,
  • marketplace release automation,
  • extension versioning tied to Nari release artifacts,
  • and broader DAP/LSP integration tests.

Troubleshooting

VS Code does not highlight .nari files

  • 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.

LSP features do not work

  • Build the project so nari-lsp exists.
  • Set nari.lsp.serverPath to an absolute path if auto-discovery fails.
  • Verify nari.lsp.enable is true.
  • Check /tmp/nari-lsp.log on Linux for current development logs.

Debugging does not start

  • Build the interpreter.
  • Set nari.debug.interpreterPath to an absolute path if auto-discovery fails.
  • Make sure your launch configuration uses type: "nari" and points program at a .nari or .naric file.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages