diff --git a/build-flavored-queries.py b/build-flavored-queries.py index 2c45f4f..55cd8f4 100755 --- a/build-flavored-queries.py +++ b/build-flavored-queries.py @@ -196,6 +196,7 @@ (r"@keyword.control.conditional", r"@conditional"), (r"@keyword.control.import", r"@keyword"), (r"@keyword.module", r"@keyword"), + (r"@keyword.directive", r"@comment"), (r"@variable.parameter", r"@parameter"), # Changes to indent queries (r"@indent\s+@extend", r"@indent.begin"), diff --git a/queries-flavored/helix/highlights.scm b/queries-flavored/helix/highlights.scm index 7214ebd..ed99754 100644 --- a/queries-flavored/helix/highlights.scm +++ b/queries-flavored/helix/highlights.scm @@ -108,7 +108,7 @@ (comment) @comment.line -(shebang) @comment +(shebang) @keyword.directive ; highlight known settings (filtering does not always work) (setting diff --git a/queries-flavored/lapce/highlights.scm b/queries-flavored/lapce/highlights.scm index 7214ebd..ed99754 100644 --- a/queries-flavored/lapce/highlights.scm +++ b/queries-flavored/lapce/highlights.scm @@ -108,7 +108,7 @@ (comment) @comment.line -(shebang) @comment +(shebang) @keyword.directive ; highlight known settings (filtering does not always work) (setting diff --git a/queries-flavored/nvim-next/highlights.scm b/queries-flavored/nvim-next/highlights.scm index 1048d26..26ea9d5 100644 --- a/queries-flavored/nvim-next/highlights.scm +++ b/queries-flavored/nvim-next/highlights.scm @@ -108,7 +108,7 @@ (comment) @spell @comment -(shebang) @comment +(shebang) @keyword.directive ; highlight known settings (filtering does not always work) (setting diff --git a/queries-flavored/zed/highlights.scm b/queries-flavored/zed/highlights.scm index 7214ebd..ed99754 100644 --- a/queries-flavored/zed/highlights.scm +++ b/queries-flavored/zed/highlights.scm @@ -108,7 +108,7 @@ (comment) @comment.line -(shebang) @comment +(shebang) @keyword.directive ; highlight known settings (filtering does not always work) (setting diff --git a/queries-src/highlights.scm b/queries-src/highlights.scm index ef49bfa..18895f7 100644 --- a/queries-src/highlights.scm +++ b/queries-src/highlights.scm @@ -106,7 +106,7 @@ (comment) @spell @comment.line -(shebang) @comment +(shebang) @keyword.directive ; highlight known settings (filtering does not always work) (setting diff --git a/test/highlight/recipes.just b/test/highlight/recipes.just index ecea20e..f0a6ad8 100644 --- a/test/highlight/recipes.just +++ b/test/highlight/recipes.just @@ -1,6 +1,6 @@ #!/use/bin/env just -# <- comment -# ^^^^^^^^^^^^^^^^^ comment +# <- keyword.directive +# ^^^^^^^^^^^^^^^^^ keyword.directive foo: # <- function diff --git a/test/highlight/statements.just b/test/highlight/statements.just index a18c164..622fbc0 100644 --- a/test/highlight/statements.just +++ b/test/highlight/statements.just @@ -1,5 +1,5 @@ #!/usr/bin/env just -# <- comment +# <- keyword.directive foo := "abc" # <- variable