Verma Language Support for Visual Studio Code
Official VS Code language support for Verma (.vrm), a small, typed, TypeScript-flavoured scripting language.
What this extension provides
- Automatic recognition of
.vrm files as Verma
- Syntax highlighting (TextMate grammar) and semantic highlighting
- Bracket matching, auto-closing pairs, comment toggling and indentation rules
- Code snippets
- Live diagnostics (type errors), completion, hover, signature help, go to definition, find references, rename and quick fixes
- Formatting in the one canonical Verma style (format on save is on by default for Verma files)
- Run Verma File and Debug Verma File commands, with breakpoints, stepping and variables
Syntax highlighting, snippets and bracket behavior work from the extension alone. Diagnostics, completion,
formatting, running and debugging need the Verma command-line tool, installed separately (see below).
Requirements
Install Verma 1.8.0 or newer (Node.js 20 or newer is required):
npm install -g @nawrasse/verma
verma --version
Then restart VS Code. If the verma command is not on your PATH, open Settings and set verma.path to its
full location (on Windows this is usually verma.cmd inside your npm global folder).
The extension starts these commands for you:
| Command |
Used for |
verma lsp |
Language intelligence (diagnostics, completion, hover, rename, formatting) |
verma dap |
Debugging |
verma run <file> |
The Run Verma File command |
If the installed verma is older than 1.8.0, the extension shows a warning and some features may be missing.
Getting started
- Open or create a file ending in
.vrm.
- Check that the language indicator in the bottom-right corner says Verma.
- Use the play and debug buttons at the top right of the editor, or press
Ctrl+Shift+P (Cmd+Shift+P on macOS) and type Verma.
- Press
F5 to debug the current file.
Commands
| Command |
What it does |
| Verma: Run Verma File |
Saves the file and runs it in a terminal panel with verma run. |
| Verma: Debug Verma File |
Starts the debugger on the current file. |
| Verma: Restart Language Server |
Restarts verma lsp, for example after updating Verma. |
Snippets
| Prefix |
Inserts |
fn, efn, gfn, afn |
A function, an exported function, a generic function, an async function |
if, ife |
if and if / else |
for, forr, while |
for ... in, for ... in range(...), while |
try |
try / catch |
test |
A test for verma test |
imp, impa |
import { ... } from, import * as ... from |
type |
A type alias |
spawn, chan |
A task and a channel |
pr |
print(...) |
Settings
| Setting |
Default |
Purpose |
verma.path |
verma |
The Verma command, or the full path to it |
verma.hints.unusedImports |
true |
Fade out imports that are never used, with a quick fix to remove them |
verma.diagnostics.workspace |
false |
Report problems for every .vrm file in the workspace, not only the open ones |
A workspace can override verma.path, but the override is ignored until you trust the workspace, so an untrusted
project cannot make the extension run a program of its choosing.
Troubleshooting
- "Could not start the Verma language server": install Verma (
npm install -g @nawrasse/verma), restart
VS Code, or set verma.path.
- Highlighting works but there are no errors or completions: the language server is not running. Open the
Verma output panel for details.
- Paths with spaces on Windows: set
verma.path to the plain path; the extension adds the quotes.
License
This extension is licensed under the Verma Proprietary Software License (VPSL) 1.1, included as LICENSE.md.
Third-party components are listed in THIRD_PARTY_NOTICES.md. Licensing questions: nawrasseandaloussi@gmail.com.
| |