Powang LSP
Syntax highlighting, diagnostics and completion for the Powang programming language.
Features
- Syntax highlighting via TextMate grammar and semantic tokens, including typed arrays,
pattern matching, destructuring, interpolation and null-safe operators
- Distinct colors for builtins, builtin types, user types, module names, functions,
methods, parameters, properties, macros, constants, variables and keywords
- Diagnostics from the parser and gradual type checker, including typed array element checks
- Context-aware completion for keywords, builtins, types, functions, variables, modules,
type members and snippets, with documentation for every item
- Rich hover with builtin documentation, declaration comments, signatures and variable types
- Signature help for functions, methods, module members and builtins
- Go to definition, declaration and type definition
- Document and workspace symbols with type members and hierarchy
- Find references, document highlights and rename with prepare support
- Inlay hints for inferred variable types
- Folding ranges for blocks and comments
- Formatting
- Language configuration: brackets, comments, indentation rules, auto-closing pairs
Colors
The extension ships the Powang Dark color theme. Every language feature has its own
color, including builtins, builtin types, user types, module names, functions, methods,
parameters, properties, macros, constants, variables and keywords.
Select it from Preferences: Color Theme and choose Powang Dark.
Installation
From the VS Code Marketplace (once published)
- Open VS Code.
- Press
Ctrl+Shift+X to open the Extensions panel.
- Search for
Powang.
- Click Install.
From a .vsix file
- Download the
.vsix file from the releases page.
- Open VS Code.
- Press
Ctrl+Shift+P, run Extensions: Install from VSIX..., and select the file.
From source (development)
git clone https://github.com/POLA-LCS/powang-lsp
cd powang-lsp
code --extensionDevelopmentPath=.
LSP server
The extension bundles the LSP server at server/powang_lsp.py and starts it
automatically. The server requires Python 3.12+ and a checkout of the powang
repository, because it imports the language implementation from src/.
Configure the Python interpreter in your VS Code settings:
{
"powang.server.pythonPath": "python"
}
If Python is not on your PATH, set the full path:
{
"powang.server.pythonPath": "C:/Python312/python.exe"
}
Set powang.server.repositoryPath to the powang repository root. If the
workspace itself is the powang repository, the extension detects it
automatically. Set the powang.server.extraArgs setting to pass additional
arguments to the server.
What the LSP does
- Publishes syntax diagnostics from the parser.
- Publishes type diagnostics from the gradual checker.
- Offers keyword and builtin completion.
- Provides hover, goto definition and declaration.
- Provides document and workspace symbols.
- Provides find references and rename.
- Provides formatting and semantic tokens.
Links
| |