Open jason-ci opened 6 months ago
It seems the top most command
node in the treesitter output is incorrectly catching the corepack
command onwards, until the end of the 4th and final RUN
directive, with everything after being treated as an argument to corepack
I think I'm experiencing the same problem going off your explanation. Its considering everything after python3 as an argument.
FROM alpine:edge
USER root
ENV PYTHONUNBUFFERED=1
RUN apk add python3
#RUN pip3 install --no-cache --upgrade pip setuptools
RUN apk add curl
WORKDIR /app
copy . .
CMD python3 main.py
(source_file ; [0, 0] - [16, 0]
(program ; [5, 4] - [15, 19]
(command ; [5, 4] - [15, 19]
name: (command_name ; [5, 4] - [5, 7]
(word)) ; [5, 4] - [5, 7]
argument: (word) ; [5, 8] - [5, 11]
argument: (concatenation ; [5, 12] - [9, 7]
(word) ; [5, 12] - [5, 19]
(word)) ; [9, 4] - [9, 7]
argument: (word) ; [9, 8] - [9, 11]
argument: (word) ; [9, 12] - [15, 11]
argument: (word))) ; [15, 12] - [15, 19]
(from_instruction ; [0, 0] - [0, 16]
(image_spec ; [0, 5] - [0, 16]
name: (image_name) ; [0, 5] - [0, 11]
tag: (image_tag))) ; [0, 11] - [0, 16]
(user_instruction ; [2, 0] - [2, 9]
user: (unquoted_string)) ; [2, 5] - [2, 9]
(env_instruction ; [3, 0] - [3, 22]
(env_pair ; [3, 4] - [3, 22]
name: (unquoted_string) ; [3, 4] - [3, 20]
value: (unquoted_string))) ; [3, 21] - [3, 22]
(run_instruction ; [5, 0] - [5, 19]
(shell_command ; [5, 4] - [5, 19]
(shell_fragment))) ; [5, 4] - [5, 19]
(comment) ; [6, 0] - [6, 53]
(run_instruction ; [9, 0] - [9, 16]
(shell_command ; [9, 4] - [9, 16]
(shell_fragment))) ; [9, 4] - [9, 16]
(workdir_instruction ; [11, 0] - [11, 12]
(path)) ; [11, 8] - [11, 12]
(copy_instruction ; [13, 0] - [13, 8]
(path) ; [13, 5] - [13, 6]
(path)) ; [13, 7] - [13, 8]
(cmd_instruction ; [15, 0] - [15, 19]
(shell_command ; [15, 4] - [15, 19]
(shell_fragment)))) ; [15, 4] - [15, 19]
highlighting
same here
This appears to be an issue with the bash language injection. program
is not a node created by the Dockerfile grammar, and disabling the bash injections gives me correct looking highlighting. I do not actually maintain the injections in nvim-treesitter, so I'm not exactly sure what's going on there, but it seem possible the issue is related to this.
Hi, I'm seeing some incorrect highlighting for some of the
RUN
directives in thisDockerfile
in Neovim;Output of
:InspectTree
;Screenshot of highlighting I'm seeing;
Build info;
3ef8d25df2d8eca6f15a6889cb2bc9d4c6101096
dockerfile.so
parser commit:439c3e7b8a9bfdbf1f7d7c2beaae4173dc484cbf