|
1 | 1 | ;; extends |
2 | 2 |
|
3 | | -; Generic |
| 3 | +; home.file.*.text |
4 | 4 | (binding |
5 | 5 | attrpath: (_) @_path |
6 | 6 | expression: (_ |
|
10 | 10 | (#hmts-inject! @_path) |
11 | 11 | ) @combined |
12 | 12 |
|
| 13 | +; xdg.configFile.*.text |
13 | 14 | (binding |
14 | 15 | attrpath: (_) @_path |
15 | 16 | expression: (_ |
|
19 | 20 | (#hmts-inject! @_path) |
20 | 21 | ) @combined |
21 | 22 |
|
| 23 | +; '' |
| 24 | +; #! /bin/lang |
| 25 | +; '' |
22 | 26 | ( |
23 | 27 | (indented_string_expression |
24 | 28 | (string_fragment) @_lang (#lua-match? @_lang "^%s*#!.*/.") ; use lua regex for consistency with the next line |
|
31 | 35 |
|
32 | 36 | ; Fish |
33 | 37 | (binding |
34 | | - attrpath: (_) @_path (#match? @_path "((interactive|login)S|s)hellInit$") |
| 38 | + attrpath: (_) @_path (#hmts-path? @_path "programs" "fish" "((interactive|login)S|s)hellInit$") |
35 | 39 | expression: (_ (string_fragment) @fish) |
36 | | - ; TODO: find a way to have proper regex support here |
37 | | - (#hmts-path? @_path "programs" "fish" ".*") |
38 | 40 | ) @combined |
39 | 41 |
|
40 | 42 | (binding |
41 | | - attrpath: (_) @_path |
| 43 | + attrpath: (_) @_path (#hmts-path? @_path "programs" "fish" "functions") |
42 | 44 | expression: (attrset_expression |
43 | 45 | (binding_set |
44 | 46 | binding: (binding |
45 | 47 | attrpath: (_) |
46 | 48 | expression: (_ (string_fragment) @fish) |
47 | 49 | ))) |
48 | | - (#hmts-path? @_path "programs" "fish" "functions") |
49 | 50 | ) @combined |
50 | 51 |
|
51 | 52 | ; Bash |
52 | 53 | (binding |
53 | | - attrpath: (_) @_path (#match? @_path "(init|logout|profile|bashrc)Extra$") |
| 54 | + attrpath: (_) @_path (#hmts-path? @_path "programs" "bash" "(init|logout|profile|bashrc)Extra$") |
54 | 55 | expression: (_ (string_fragment) @bash) |
55 | | - ; TODO: find a way to have proper regex support here |
56 | | - (#hmts-path? @_path "programs" "bash" ".*") |
57 | 56 | ) @combined |
58 | 57 |
|
59 | 58 | ; Zsh |
60 | 59 | (binding |
| 60 | + attrpath: (_) @_path |
61 | 61 | ; eww |
62 | | - attrpath: (_) @_path (#match? @_path "(completionInit|envExtra|initExtra|initExtraBeforeCompInit|initExtraFirst|loginExtra|logoutExtra|profileExtra)$") |
| 62 | + (#hmts-path? @_path "programs" "bash" "(completionInit|envExtra|initExtra|initExtraBeforeCompInit|initExtraFirst|loginExtra|logoutExtra|profileExtra)$") |
63 | 63 | expression: (_ (string_fragment) @bash) |
64 | | - ; TODO: find a way to have proper regex support here |
65 | | - (#hmts-path? @_path "programs" "bash" ".*") |
66 | 64 | ) @combined |
67 | 65 |
|
68 | 66 | ; Firefox |
69 | 67 | (binding |
70 | | - attrpath: (_) @_path |
| 68 | + attrpath: (_) @_path (#hmts-path? @_path "programs" "firefox" "profiles" ".*" "userChrome") |
71 | 69 | expression: (_ (string_fragment) @css) |
72 | | - (#hmts-path? @_path "programs" "firefox" "profiles" ".*" "userChrome") |
73 | 70 | ) @combined |
0 commit comments