XanaScript for VS Code
Official XanaScript (.xs) extension for Visual Studio Code.
Features
- Syntax highlighting — full support for the v3 language
- LSP client — diagnostics, hover, go-to-definition
- Autocomplete — keywords, builtins, and types
- Formatter — auto-format
.xs files
- Snippets — shortcuts for common structures
- Commands — run, build, test, and format from the editor
Installation
git clone https://github.com/xanascr/xs-vscode.git
cd xs-vscode
npm install -g @vscode/vsce
vsce package
code --install-extension xanascript-*.vsix
Or open the folder in VS Code and press F5.
Requires the XanaScript CLI on your PATH for run, build, test, and LSP features.
Commands
| Command |
Description |
XanaScript: Executar arquivo |
Run the current .xs file |
XanaScript: Build (JS otimizado) |
Compile to JavaScript |
XanaScript: Rodar testes |
Run the test suite |
XanaScript: Format arquivo |
Format the current file |
| Keybinding |
Action |
Ctrl+Alt+X |
Run file |
Ctrl+Alt+B |
Build |
Shift+Alt+F |
Format |
Snippets
| Shortcut |
Expands to |
cria |
cria nome = valor |
lei |
lei NOME = valor |
fofoca |
fofoca nome = valor |
se |
se-pah (cond) { } |
funcao |
resolve nome(params) { } |
repete |
repete-na-moral (init; test; upd) { } |
enquanto |
repete-enquanto (cond) { } |
grita |
grita-ae(expr) |
traz |
traz-ai "path" |
manda |
manda-ai nome |
tenta |
tenta { } fodeu(err) { } |
classe |
classe Nome { spawna() { } metodo() { } } |
View all snippets
Report bugs
https://github.com/xanascr/xs-vscode/issues
| |