Sublime Text
- Install the LSP package (Package Control → Install Package → LSP).
- Create a syntax: Tools → Developer → New Syntax… and save
OxL.sublime-syntaxinPackages/User:
%YAML 1.2
---
name: OxL
file_extensions: [oxl]
scope: source.oxl
contexts:
main:
- match: '///.*$'
scope: comment.line.documentation.oxl
- match: '//.*$'
scope: comment.line.double-slash.oxl
- match: '"'
push:
- meta_scope: string.quoted.double.oxl
- match: '\\.'
scope: constant.character.escape.oxl
- match: '"'
pop: true
- match: '\b[0-9][0-9_]*(\.[0-9]+)?(ms|us|ns|s|m|h|d)?\b'
scope: constant.numeric.oxl
- match: '@[A-Za-z_][A-Za-z0-9_]*'
scope: storage.modifier.annotation.oxl
- match: '\b(fn|let|var|const|data|enum|interface|impl|actor|msg|service|rpc|saga|undo|pipeline|topic|cluster|role|config|test|fixture|mock|use|pub|match|if|else|for|while|loop|return|fail|await|spawn|scope|select|atomic|unsafe|import|extern|export|where|in|is|as)\b'
scope: keyword.control.oxl- Preferences → Package Settings → LSP → Settings:
{
"clients": {
"oxl": {
"enabled": true,
"command": ["oxl", "lsp"],
"selector": "source.oxl",
"initializationOptions": { "debounceMs": 150 }
}
},
"show_inlay_hints": true,
"lsp_format_on_save": true
}Enable the server for a project: Command Palette → LSP: Enable Language Server in Project → oxl. Diagnostics are shown in the
panel and in the gutter, F12 is go to definition, Shift+F12 references, Ctrl+Alt+R rename (the standard bindings of the LSP
package). Sublime Text has no debugger; use oxl test --debug=lldb in a terminal (debugging).