mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +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
|
(dictionary
|
||||||
(pair ":" @_IGNORE_
|
(pair ":" @_IGNORE_
|
||||||
(#set! capture.final true)))
|
(#set! capture.final)))
|
||||||
|
|
||||||
|
; …lambda functions…
|
||||||
((lambda ":" @_IGNORE_)
|
((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
|
":" @indent
|
||||||
|
|
||||||
; When typing out "else" after an "if" statement, tree-sitter-python won't
|
; When typing out "else" after an "if" statement, tree-sitter-python won't
|
||||||
|
Loading…
Reference in New Issue
Block a user