mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
Add config for Dockerfile parser (#1288)
This commit is contained in:
parent
9e0f764b67
commit
40ffe75bd2
4 changed files with 63 additions and 0 deletions
|
|
@ -144,6 +144,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
|
||||
- [x] [dart](https://github.com/UserNobody14/tree-sitter-dart) (maintained by @Akin909)
|
||||
- [x] [devicetree](https://github.com/joelspadin/tree-sitter-devicetree) (maintained by @jedrzejboczar)
|
||||
- [x] [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) (maintained by @camdencheek)
|
||||
- [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm)
|
||||
- [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera)
|
||||
- [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD)
|
||||
|
|
|
|||
|
|
@ -64,6 +64,15 @@ list.cpp = {
|
|||
maintainers = {"@theHamsta"},
|
||||
}
|
||||
|
||||
list.dockerfile = {
|
||||
install_info = {
|
||||
url = "https://github.com/camdencheek/tree-sitter-dockerfile",
|
||||
branch = "main",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = {"@camdencheek"},
|
||||
}
|
||||
|
||||
list.rust = {
|
||||
install_info = {
|
||||
url = "https://github.com/tree-sitter/tree-sitter-rust",
|
||||
|
|
|
|||
50
queries/dockerfile/highlights.scm
Normal file
50
queries/dockerfile/highlights.scm
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[
|
||||
"FROM"
|
||||
"AS"
|
||||
"RUN"
|
||||
"CMD"
|
||||
"LABEL"
|
||||
"EXPOSE"
|
||||
"ENV"
|
||||
"ADD"
|
||||
"COPY"
|
||||
"ENTRYPOINT"
|
||||
"VOLUME"
|
||||
"USER"
|
||||
"WORKDIR"
|
||||
"ARG"
|
||||
"ONBUILD"
|
||||
"STOPSIGNAL"
|
||||
"HEALTHCHECK"
|
||||
"SHELL"
|
||||
"MAINTAINER"
|
||||
"CROSS_BUILD"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
":"
|
||||
"@"
|
||||
] @operator
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(image_spec
|
||||
(image_tag
|
||||
":" @punctuation.special)
|
||||
(image_digest
|
||||
"@" @punctuation.special))
|
||||
|
||||
(double_quoted_string) @string
|
||||
|
||||
(expansion
|
||||
[
|
||||
"$"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.special
|
||||
)
|
||||
|
||||
((variable) @constant
|
||||
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
|
||||
|
||||
3
queries/dockerfile/injections.scm
Normal file
3
queries/dockerfile/injections.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(comment) @comment
|
||||
|
||||
(shell_command) @bash
|
||||
Loading…
Add table
Add a link
Reference in a new issue