aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/nix/test.nix
blob: 296a5a934c5ee21951af88b807c380764320f241 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  func1 = param: builtins.readFile param;
  # ^ @function
        # ^ @variable.parameter
                # ^ @constant.builtin
                         # ^ @function.builtin
  func2 = { p1, p2 }: p2;
  # ^ @function
          # ^ @variable.parameter
  readFile' = readFile;
              # ^ @function.builtin
  x = func1 ./path/to/file.nix;
# ^ @variable.member
      # ^ @function.call
              # ^ @string.special.path
  hi = if true then 9 else throw "an error ${here + "string"}";
                           # ^ @keyword.exception
                                  # ^ @string
                                             # ^ @variable
                                                     # ^ @string
}