Visual Studio Code extension for the Apica language. It adds syntax highlighting for
Apica source files (.apc) and connects VS Code to the language server shipped with
apica-compiler (apic lsp).
Features
Syntax highlighting (comments, strings, raw strings, characters, numbers, keywords,
types, APICA:: package calls, function calls, operators).
Editor configuration: // and /* */ comments, bracket matching, auto-closing and
surrounding pairs, auto-indentation on { / }.
Everything apic lsp provides: diagnostics, hover, completion, signature help,
go to definition, find references, rename, document outline and semantic
highlighting.
Requirements
The language features need the apic compiler. Download it from the
latest release and
either put it in your PATH or set apica.server.path to its location. The extension
also looks in ~/.cargo/bin and ~/.local/bin, which a desktop-launched VS Code often
leaves out of its PATH. If apic cannot be found, a notification offers to open the
setting or the download page.
Syntax highlighting works without apic.
Settings
Setting
Default
Description
apica.server.path
"apic"
Path to apic: a bare name is looked up in PATH; ~ and ${workspaceFolder} are expanded
apica.server.args
["lsp"]
Arguments passed to apic to start the language server
apica.trace.server
"off"
Traces the LSP traffic: off, messages or verbose
Changing apica.server.path or apica.server.args restarts the server automatically.
Commands
Command
Description
Apica: Restart Language Server
Stops and restarts apic lsp
Apica: Show Language Server Output
Opens the server log
A status bar item shows whether the server is running; click it to open the log.
Server logs and traces (apica.trace.server) appear in the Apica Language Server
output channel. Semantic highlighting is enabled by default for Apica files.
Development
npm install
npm run compile # or: npm run watch
Press F5 in VS Code to launch an Extension Development Host with the extension
loaded. To build a .vsix package: