Add fields to Nix highlighting

This commit is contained in:
leo60228 2020-11-18 17:43:17 -05:00 committed by Thomas Vigouroux
parent 9634d9b32a
commit 4f1dd5c151

View file

@ -75,6 +75,10 @@
; string interpolation (this was very annoying to get working properly)
(interpolation "${" @punctuation.special (_) "}" @punctuation.special) @none
; fields (the `.` in `a.b = c;` isn't included)
(attrset (bind . (attrpath (identifier) @field)))
(rec_attrset (bind . (attrpath (identifier) @field)))
; integers, also highlight a unary -
[
(unary "-" (integer))