mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 22:40:12 -04:00
highlights(swift): highlight punctuation
"?" is still missing: https://github.com/tree-sitter/tree-sitter-swift/issues/38
This commit is contained in:
parent
b42de97339
commit
a3c86fe843
2 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
[ "." ";" ":" "," "->" ] @punctuation.delimiter
|
||||
[ "\\(" "(" ")" "[" "]" "{" "}"] @punctuation.bracket ; TODO: "\\(" ")" in interpolations should be @punctuation.special
|
||||
|
||||
; Identifiers
|
||||
(attribute) @variable
|
||||
(simple_identifier) @variable
|
||||
|
|
|
|||
7
tests/query/highlights/swift/string-interpolation.swift
Normal file
7
tests/query/highlights/swift/string-interpolation.swift
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
var one = 1
|
||||
var two = 2
|
||||
var name = "Let's do some math: \(one) + \(one) = \(one + one) = \(two)"
|
||||
// ^ punctuation.bracket
|
||||
// ^ variable
|
||||
// ^ punctuation.bracket
|
||||
// ^ punctuation.bracket
|
||||
Loading…
Add table
Add a link
Reference in a new issue