erlang: highlight unary '#' as punctuation.bracket
The '#' character may either be interpreted as a map when used like so: %% Example 1 #{a => b} Or as an operator which updates an existing map when the left-hand side is an expression: %% Example 2 MyMap#{a => b} This commit changes the highlight to `punctuation.bracket` when used as a character in a literal map (example 1) and keeps the `operator` highlight when used for updating (example 2).
This commit is contained in:
parent
d523280e85
commit
bd527c84e6
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@
|
|||
|
||||
(binary_operator operator: _ @operator)
|
||||
(unary_operator operator: _ @operator)
|
||||
["/" ":" "#" "->"] @operator
|
||||
["/" ":" "->"] @operator
|
||||
|
||||
(tripledot) @comment.discard
|
||||
|
||||
|
@ -123,6 +123,6 @@
|
|||
|
||||
; Punctuation
|
||||
["," "." "-" ";"] @punctuation.delimiter
|
||||
["(" ")" "{" "}" "[" "]" "<<" ">>"] @punctuation.bracket
|
||||
["(" ")" "#" "{" "}" "[" "]" "<<" ">>"] @punctuation.bracket
|
||||
|
||||
; (ERROR) @error
|
||||
|
|
Loading…
Add table
Reference in a new issue