]> git.ipfire.org Git - thirdparty/vim.git/commit
Runtime: Add nixInherit matcher in nix.vim syntax
authorJames Fleming <james@electronic-quill.net>
Sat, 29 Jul 2023 10:01:18 +0000 (12:01 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 20 Aug 2023 17:20:55 +0000 (19:20 +0200)
commit72904d5fda0a1bc78f4bc9080c158226e6e90d5c
tree5d2f789cc2cc37e08048975f12705e02920e030f
parent2d0988ef93c6e8e59381c9cd123efbc2cd1faf92
Runtime: Add nixInherit matcher in nix.vim syntax

Perform the lookahead in `nixInheritAttributeScope`, then hand over to a
new region called `nixInheritAttributeSubExpr`, which sets the match
start to one char after the opening bracket to avoid a double-match.

Finally, only do a lookahead to `)` in `nixInheritAttributeSubExpr` (and
thus make sure the region is closed to not get a match of `nixParen`
here) and let `nixInheritAttributeScope` close the bracket.

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/nix.vim