Skip to content

Commit fba1597

Browse files
committed
fix(tree-sitter): replace lua-match with match in highlights
`lua-match` is specific to tree-sitter in Neovim. Currently these query predicates are ignored so will highlight much more than they should.
1 parent 19eeb5d commit fba1597

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/textual/tree-sitter/highlights/css.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
(namespace_name) @namespace
5858

5959
((property_name) @type.definition
60-
(#lua-match? @type.definition "^[-][-]"))
60+
(#match? @type.definition "^[-][-]"))
6161
((plain_value) @type
62-
(#lua-match? @type "^[-][-]"))
62+
(#match? @type "^[-][-]"))
6363

6464
[
6565
(string_value)

src/textual/tree-sitter/highlights/python.scm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
;; Identifier naming conventions
1313
((identifier) @type
14-
(#lua-match? @type "^[A-Z].*[a-z]"))
14+
(#match? @type "^[A-Z].*[a-z]"))
1515
((identifier) @constant
16-
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
16+
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
1717

1818
((attribute
1919
attribute: (identifier) @field)
@@ -59,12 +59,12 @@
5959

6060
((call
6161
function: (identifier) @constructor)
62-
(#lua-match? @constructor "^[A-Z]"))
62+
(#match? @constructor "^[A-Z]"))
6363

6464
((call
6565
function: (attribute
6666
attribute: (identifier) @constructor))
67-
(#lua-match? @constructor "^[A-Z]"))
67+
(#match? @constructor "^[A-Z]"))
6868

6969
;; Decorators
7070

0 commit comments

Comments
 (0)