From cc3b77b584576fd16a598d23bd29cf2da455eb77 Mon Sep 17 00:00:00 2001 From: Tim Sampson Date: Tue, 17 Dec 2024 21:26:49 +0200 Subject: [PATCH] dockerfile: bump tree-sitter grammar to gain support for heredocs (#12230) --- languages.toml | 2 +- runtime/queries/dockerfile/highlights.scm | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index bd67fb86a..81254ee52 100644 --- a/languages.toml +++ b/languages.toml @@ -1706,7 +1706,7 @@ language-servers = [ "docker-langserver" ] [[grammar]] name = "dockerfile" -source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "8ee3a0f7587b2bd8c45c8cb7d28bd414604aec62" } +source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "087daa20438a6cc01fa5e6fe6906d77c869d19fe" } [[language]] name = "docker-compose" diff --git a/runtime/queries/dockerfile/highlights.scm b/runtime/queries/dockerfile/highlights.scm index cdbf807c2..51398e59e 100644 --- a/runtime/queries/dockerfile/highlights.scm +++ b/runtime/queries/dockerfile/highlights.scm @@ -19,6 +19,8 @@ "SHELL" "MAINTAINER" "CROSS_BUILD" + (heredoc_marker) + (heredoc_end) ] @keyword [ @@ -35,7 +37,12 @@ (image_digest "@" @punctuation.special)) -(double_quoted_string) @string +[ + (double_quoted_string) + (single_quoted_string) + (json_string) + (heredoc_line) +] @string (expansion [