Closed
Description
Summary
If the Racket LSP is enabled there's no syntax highlighting whatsoever. Here's my languages.toml
file:
[[language]]
name = "racket"
scope = "source.rkt"
roots = []
file-types = ["rkt"]
shebangs = ["racket"]
comment-token = ";"
grammar = "racket"
language-server = { command = "racket", args = ["-l", "racket-langserver"] }
[[grammar]]
name = "racket"
source = { git = "https://github.com/6cdh/tree-sitter-racket", rev = "09cb27a06415bce529a26774a842f5a80d50d362" }
Notes:
- The language server appears to connect to helix, and is installed properly.
- If I change the
rkt
infile-types = ["rkt"]
to gibberish (or comment out the entire language block), then there is syntax highlighting - I tried to install the
tree-sitter-racket
thing to see if that'd help at all. It was a bit of a struggle, and I still don't think that it works. - Without
tree-sitter-racket
the issue persists - I used the latest version of Helix in the Arch repositories (from September), and the latest git build, there were no observable differences
Reproduction Steps
Install racket and the racket language server (using raco) as specified on the installation page. Have this in your language.toml
.
[[language]]
name = "racket"
scope = "source.rkt"
roots = []
file-types = ["rkt"]
shebangs = ["racket"]
comment-token = ";"
grammar = "racket"
language-server = { command = "racket", args = ["-l", "racket-langserver"] }
Racket files (ie. those with extension .rkt
) will have no syntax highlighting if the above is set correctly. When removing the above lines .rkt
files will have syntax highlighting.
Helix log
With LSP enabled and opening a racket file with hx -v
, these are the the log entries:
~/.cache/helix/helix.log
2022-11-27T23:21:58.408 helix_view::editor [ERROR] Failed to initialize the LSP for `source.toml` { cannot find binary path }
2022-11-27T23:22:37.361 helix_view::clipboard [INFO] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2022-11-27T23:22:37.362 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"processId":206149,"rootPath":"/home/mond/Racket/AdventOfCode2022","rootUri":"file:///home/mond/Racket/AdventOfCode2022","workspaceFolders":[{"name":"AdventOfCode2022","uri":"file:///home/mond/Racket/AdventOfCode2022"}]},"id":0}
Platform
Linux
Terminal Emulator
foot-extra
Helix Version
helix 22.08.1 (583c2a5)