mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 08:20:05 -04:00
Python highlights: Reset highlighting in f-string interpolation
This solution is preferable to `(identifier) @Normal` since otherwise everything without highlight will use string-highlighting.
This commit is contained in:
parent
88c8b70560
commit
75bce1dc93
1 changed files with 3 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
;; From tree-sitter-python licensed under MIT License
|
;; From tree-sitter-python licensed under MIT License
|
||||||
; Copyright (c) 2016 Max Brunsfeld
|
; Copyright (c) 2016 Max Brunsfeld
|
||||||
|
|
||||||
; Identifier naming conventions
|
; Reset highlighing in f-string interpolations
|
||||||
|
(interpolation) @Normal
|
||||||
|
|
||||||
(identifier) @Normal
|
; Identifier naming conventions
|
||||||
((identifier) @type
|
((identifier) @type
|
||||||
(match? @type "^[A-Z]"))
|
(match? @type "^[A-Z]"))
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue