You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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}
Adding that block to your ~/.config/helix/languages.toml must change the precedence so that we use racket over scheme for rkt files.
It looks like since rkt files belong to scheme, you can't currently use the racket language server. This can be fixed in this repository's languages.toml by explicitly using the scheme grammar for the racket [[language]] entry and setting up queries that inherit from scheme.
Summary
If the Racket LSP is enabled there's no syntax highlighting whatsoever. Here's my
languages.toml
file:Notes:
rkt
infile-types = ["rkt"]
to gibberish (or comment out the entire language block), then there is syntax highlightingtree-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.tree-sitter-racket
the issue persistsReproduction Steps
Install racket and the racket language server (using raco) as specified on the installation page. Have this in your
language.toml
.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
Platform
Linux
Terminal Emulator
foot-extra
Helix Version
helix 22.08.1 (583c2a5)
The text was updated successfully, but these errors were encountered: