mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
fix(python): impossible patterns
This commit is contained in:
parent
c5623d3486
commit
e1820bbda1
3 changed files with 15 additions and 14 deletions
|
|
@ -1779,8 +1779,8 @@ return {
|
||||||
},
|
},
|
||||||
python = {
|
python = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'v0.25.0',
|
revision = 'v0.25.2',
|
||||||
url = 'https://github.com/tree-sitter/tree-sitter-python',
|
url = 'https://github.com/tree-sitter/py-tree-sitter',
|
||||||
},
|
},
|
||||||
maintainers = { '@stsewd', '@theHamsta' },
|
maintainers = { '@stsewd', '@theHamsta' },
|
||||||
tier = 1,
|
tier = 1,
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,10 @@
|
||||||
|
|
||||||
; doc-strings
|
; doc-strings
|
||||||
(expression_statement
|
(expression_statement
|
||||||
(string
|
(expression
|
||||||
(string_content) @spell) @string.documentation)
|
(primary_expression
|
||||||
|
(string
|
||||||
|
(string_content) @spell))) @string.documentation)
|
||||||
|
|
||||||
; Tokens
|
; Tokens
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -45,16 +45,15 @@
|
||||||
":"
|
":"
|
||||||
(#set! indent.immediate 1)) @indent.begin
|
(#set! indent.immediate 1)) @indent.begin
|
||||||
|
|
||||||
(ERROR
|
; (ERROR
|
||||||
"try"
|
; "try"
|
||||||
.
|
; .
|
||||||
":"
|
; ":"
|
||||||
(ERROR
|
; (ERROR
|
||||||
(block
|
; (block
|
||||||
(expression_statement
|
; (expression_statement
|
||||||
(identifier) @_except) @indent.branch))
|
; (identifier) @_except) @indent.branch))
|
||||||
(#eq? @_except "except"))
|
; (#eq? @_except "except"))
|
||||||
|
|
||||||
((function_definition) @indent.begin
|
((function_definition) @indent.begin
|
||||||
(#set! indent.immediate 1))
|
(#set! indent.immediate 1))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue