diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-09-19 13:35:29 +0200 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-09-19 13:41:33 +0200 |
| commit | 20fc6b1270dddff7e16220e0a51d17614d41fd43 (patch) | |
| tree | 31d5c4aee65cb17af051ee961e44a0b30e57162b | |
| parent | feat(latex): add counter nodes' highlight rules (diff) | |
| download | nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar.gz nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar.bz2 nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar.lz nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar.xz nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.tar.zst nvim-treesitter-20fc6b1270dddff7e16220e0a51d17614d41fd43.zip | |
feat(python): revert breaking change
This reverts the update in
https://github.com/nvim-treesitter/nvim-treesitter/pull/8128 which
turned out to have further breaking consequences.
Pin the parser to the last release (tier 1) to avoid pulling in more
breaking changes.
| -rw-r--r-- | SUPPORTED_LANGUAGES.md | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 4 | ||||
| -rw-r--r-- | runtime/queries/python/highlights.scm | 12 |
3 files changed, 10 insertions, 8 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md index 361585ab2..61371d0e0 100644 --- a/SUPPORTED_LANGUAGES.md +++ b/SUPPORTED_LANGUAGES.md @@ -227,7 +227,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | | @steelsojka [puppet](https://github.com/tree-sitter-grammars/tree-sitter-puppet) | unstable | `HFIJL` | | @amaanq [purescript](https://github.com/postsolar/tree-sitter-purescript) | unstable | `H JL` | | @postsolar [pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) | unstable | `H J ` | | @ObserverOfTime -[python](https://github.com/tree-sitter/tree-sitter-python) | unstable | `HFIJL` | | @stsewd, @theHamsta +[python](https://github.com/tree-sitter/tree-sitter-python) | stable | `HFIJL` | | @stsewd, @theHamsta [ql](https://github.com/tree-sitter/tree-sitter-ql) | unstable | `HFIJL` | | @pwntester [qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) | unstable | `H J ` | | @amaanq [qmljs](https://github.com/yuja/tree-sitter-qmljs) | unstable | `HF J ` | | @Decodetalkers diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 16d575512..79fe3a6b6 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1772,11 +1772,11 @@ return { }, python = { install_info = { - revision = '26855eabccb19c6abf499fbc5b8dc7cc9ab8bc64', + revision = 'v0.25.0', url = 'https://github.com/tree-sitter/tree-sitter-python', }, maintainers = { '@stsewd', '@theHamsta' }, - tier = 2, + tier = 1, }, ql = { install_info = { diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index 0cdc957d0..e5b9ac3aa 100644 --- a/runtime/queries/python/highlights.scm +++ b/runtime/queries/python/highlights.scm @@ -358,15 +358,17 @@ ((class_definition body: (block - (assignment - left: (identifier) @variable.member))) + (expression_statement + (assignment + left: (identifier) @variable.member)))) (#lua-match? @variable.member "^[%l_].*$")) ((class_definition body: (block - (assignment - left: (_ - (identifier) @variable.member)))) + (expression_statement + (assignment + left: (_ + (identifier) @variable.member))))) (#lua-match? @variable.member "^[%l_].*$")) ((class_definition |
