Helix
Add to ~/.config/helix/languages.toml:
[language-server.oxl-lsp]
command = "oxl"
args = ["lsp"]
[[language]]
name = "oxl"
scope = "source.oxl"
file-types = ["oxl"]
roots = ["oxl.toml"]
comment-tokens = ["//", "///"]
indent = { tab-width = 2, unit = " " }
language-servers = ["oxl-lsp"]
auto-format = true
[language.debugger]
name = "oxl-dap"
transport = "stdio"
command = "oxl"
args = ["dap"]
[[language.debugger.templates]]
name = "launch"
request = "launch"
completion = [ { name = "package or file", completion = "filename", default = "." } ]
args = { program = "{0}", oxlProfile = "dev" }
[[grammar]]
name = "oxl"
source = { path = "/opt/oxl-1.0.0-beta/share/oxl/tree-sitter-oxl" }Formatting is done by the server itself (textDocument/formatting returns the result of oxl fmt), so no external formatter is
needed. Then:
(cd /opt/oxl-1.0.0-beta/share/oxl/tree-sitter-oxl && npm install && npx tree-sitter generate) # src/parser.c
hx --grammar build
mkdir -p ~/.config/helix/runtime/queries/oxl
cp /opt/oxl-1.0.0-beta/share/oxl/tree-sitter-oxl/queries/highlights.scm ~/.config/helix/runtime/queries/oxl/
hx --health oxlInlay hints are enabled in ~/.config/helix/config.toml: [editor.lsp] display-inlay-hints = true. Debugging: :debug-start
(the launch template), breakpoints with :debug-breakpoint; see debugging.