Lane for Visual Studio Code
Language support for the Lane programming language.
Features
- Syntax highlighting that works without a language server
- Diagnostics, completion, hover, and go to definition through
lane lsp
- Type, parameter name, and implicit argument inlay hints
- Document formatting through
lane fmt
- Comment, bracket, auto-closing, and surrounding-pair support
- A
Lane: Restart LSP command for restarting the language server
Requirements
Install the Lane CLI and set LANE_HOME to its installation directory. The
extension uses:
$LANE_HOME/bin/lane
The Lane executable must support both the lane lsp and lane fmt commands.
VS Code must inherit the LANE_HOME environment variable. On macOS, launching
VS Code from a configured terminal with code . is one way to ensure that the
variable is available to the extension host.
Configuration
lane.path
An optional absolute path to the Lane executable. When set, this takes
precedence over $LANE_HOME/bin/lane.
Example:
{
"lane.path": "/absolute/path/to/lane"
}
After changing LANE_HOME or lane.path, run Lane: Restart LSP from the
Command Palette.
Use the standard Format Document command. The extension runs lane fmt on a
temporary copy of the current document and applies the resulting text as one
editor edit.
To make Lane the default formatter:
{
"[lane]": {
"editor.defaultFormatter": "MilkyNatas.lane"
}
}
Troubleshooting
If the language server does not start:
- Check that
LANE_HOME is visible to VS Code or configure lane.path.
- Check that the resolved Lane executable exists and is executable.
- Run
Lane: Restart LSP.
- Open the VS Code Output panel and inspect the
Lane Language Server output.
License
MIT