mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-16 14:40:23 +03:00
[language-python] Prevent type annotations from hinting at indents
This commit is contained in:
parent
bf62b01757
commit
03af1244d3
@ -1,10 +1,16 @@
|
||||
; Excluding dictionary key/value separators…
|
||||
(dictionary
|
||||
(pair ":" @_IGNORE_
|
||||
(#set! capture.final true)))
|
||||
(#set! capture.final)))
|
||||
|
||||
; …lambda functions…
|
||||
((lambda ":" @_IGNORE_)
|
||||
(#set! capture.final true))
|
||||
(#set! capture.final))
|
||||
|
||||
; …and type annotations on function parameters/class members…
|
||||
(":" @_IGNORE_ . (type) (#set! capture.final))
|
||||
|
||||
; …all other colons we encounter hint at upcoming indents.
|
||||
":" @indent
|
||||
|
||||
; When typing out "else" after an "if" statement, tree-sitter-python won't
|
||||
|
Loading…
Reference in New Issue
Block a user