-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dockerfiles #1303
Support dockerfiles #1303
Conversation
…ml` for `Dockerfile`
To get shell highlighting to work, you need to add an ((comment) @injection.content
(#set! injection.language "comment"))
((shell_command) @injection.content
(#set! injection.language "bash")) |
Thanks for the help That didn't quite do the trick, I needed an ((comment) @injection.content
(#set! injection.language "comment"))
((shell_command) @injection.content
(#set! injection.language "bash"))
((shell_fragment) @injection.content
(#set! injection.language "bash"))
Which gives to get the following Also ((shell_fragment) @injection.content
(#set! injection.language "bash")) on its own works also Does that look okay to you ? If yes I can submit that |
If I am not mistaken, you can reuse the highlights context. helix/runtime/queries/rust/injections.scm Lines 1 to 2 in f16651b
|
@midnightexigent Yeah we want all three clauses, not just the last one (since it's targetting different nodes). And you can merge the ((comment) @injection.content
(#set! injection.language "comment"))
([(shell_command) (shell_fragment)] @injection.content
(#set! injection.language "bash")) To improve the highlighting further we can compare the |
Done |
Thanks! 🎉 |
I couldn't get it to look as neat as the original
Here is how this PR looks
I am not good enough with tree-sitter.. Anyone has any ideas ?