; File autogenerated by build-queries-nvim.py; do not edit

; This file specifies how matched syntax patterns should be highlighted

[
  "eager"
  "export"
  "import"
] @keyword.import

"mod" @module

[
  "alias"
  "set"
  "shell"
] @keyword

[
  "if"
  "else"
] @keyword.conditional

; Variables

(value
  (identifier) @variable)

(alias
  left: (identifier) @variable)

(assignment
  left: (identifier) @variable)

; Functions

(function_definition
  name: (identifier) @function)

(function_parameters
  (identifier) @variable.parameter)

(recipe_header
  name: (identifier) @function)

(dependency
  name: (identifier) @function.call)

(dependency_expression
  name: (identifier) @function.call)

(function_call
  name: (identifier) @function.call)

; Parameters

(parameter
  name: (identifier) @variable.parameter)

; Namespaces

(module
  name: (identifier) @module)

; Operators

[
  ":="
  "?"
  "=="
  "!="
  "=~"
  "@"
  "="
  "$"
  "*"
  "+"
  "&&"
  "@-"
  "-@"
  "-"
  "/"
  ":"
] @operator

; Punctuation

"," @punctuation.delimiter

[
  "{"
  "}"
  "["
  "]"
  "("
  ")"
  "{{"
  "}}"
] @punctuation.bracket

[ "`" "```" ] @punctuation.special

; Literals

(boolean) @boolean

[
  (string)
  (external_command)
  (format_string)
] @string

(escape_sequence) @string.escape

; Comments

(comment) @spell @comment

(shebang) @keyword.directive

; highlight known settings (filtering does not always work)
(setting
  left: (identifier) @keyword
  (#any-of? @keyword
    "allow-duplicate-recipes"
    "allow-duplicate-variables"
    "dotenv-filename"
    "dotenv-load"
    "dotenv-path"
    "dotenv-required"
    "export"
    "fallback"
    "ignore-comments"
    "positional-arguments"
    "shell"
    "shell-interpreter"
    "tempdir"
    "windows-powershell"
    "windows-shell"
    "working-directory"))

; highlight known attributes (filtering does not always work)
(attribute
  (identifier) @attribute
  (#any-of? @attribute
    "confirm"
    "doc"
    "extension"
    "group"
    "linux"
    "macos"
    "no-cd"
    "no-exit-message"
    "no-quiet"
    "positional-arguments"
    "private"
    "script"
    "unix"
    "windows"))

; Numbers are part of the syntax tree, even if disallowed
(numeric_error) @error
