helix icon indicating copy to clipboard operation
helix copied to clipboard

Dockerfile syntax

Open hholst80 opened this issue 3 years ago • 4 comments

Summary

HERE document parsing does not work

Example

FROM ubuntu:20.04
RUN <<EOF
  apt-get update
  apt-get install tree
EOF
RUN tree /tmp

The last line will not color correctly.

Reproduction Steps

No response

Helix log

No response

Platform

Linux

Terminal Emulator

xterm-256color

Helix Version

helix 22.05 (27609f50)

hholst80 avatar Jul 23 '22 11:07 hholst80

Validated this on the most recent version: helix 22.05 (dfc31e74)

amitbeka avatar Jul 23 '22 14:07 amitbeka

It is an upstream bug in the treesitter grammar itself, unfortunately: https://github.com/camdencheek/tree-sitter-dockerfile/issues/4

amitbeka avatar Jul 23 '22 14:07 amitbeka

There is a workaround, but I think its brittle and ugly to have to use the backslashes all over

image

hholst80 avatar Jul 23 '22 16:07 hholst80

There is no heredoc in this screenshot, so the problem doesn't exist. If you mean to use backslashes and && instead of a heredoc -- yeah that's always possible, I'm very used to it.

amitbeka avatar Jul 24 '22 08:07 amitbeka

It seems that there have been fixes for this that were merged, but they don't seem to be applied in the latest version of Helix? I'm kind of confused about the status of this issue.

If the fixes are not applied, is there a way that I can apply them myself in my config files?

tangowithfoxtrot avatar Nov 15 '24 18:11 tangowithfoxtrot

Seems like the support is merged upstream. but someone needs to update the queries/highlights here along with the rev change.

RoloEdits avatar Nov 23 '24 10:11 RoloEdits