<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nvim-treesitter/queries/python/indents.scm, branch test/plenary</title>
<subtitle>[no description]</subtitle>
<id>http://git.sudomsg.com/mirror/nvim-treesitter/atom/queries/python/indents.scm?h=test%2Fplenary</id>
<link rel='self' href='http://git.sudomsg.com/mirror/nvim-treesitter/atom/queries/python/indents.scm?h=test%2Fplenary'/>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/'/>
<updated>2025-05-12T16:43:40Z</updated>
<entry>
<title>feat!: drop modules, general refactor and cleanup</title>
<updated>2025-05-12T16:43:40Z</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2023-06-12T15:54:30Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=692b051b09935653befdb8f7ba8afdb640adf17b'/>
<id>urn:sha1:692b051b09935653befdb8f7ba8afdb640adf17b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(python): Improved python indentation (#6859)</title>
<updated>2024-07-16T11:13:41Z</updated>
<author>
<name>Grace Petryk</name>
<email>gracepetryk99@gmail.com</email>
</author>
<published>2024-07-16T11:13:41Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=f16a77583047d6d3ea684092c679bbe88398cb01'/>
<id>urn:sha1:f16a77583047d6d3ea684092c679bbe88398cb01</id>
<content type='text'>
* feat: improve python indentation

* use lua-match

* revert concatenated_string changes, handle function def hanging indents

* lint

* add delimiters to param query

* add test cases</content>
</entry>
<entry>
<title>refactor(format): drop extra indentation for field</title>
<updated>2024-03-21T14:51:26Z</updated>
<author>
<name>Phạm Huy Hoàng</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2024-03-21T11:44:35Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=722617e6726c1508adadf83d531f54987c703be0'/>
<id>urn:sha1:722617e6726c1508adadf83d531f54987c703be0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(python): better try-except indentation (#6097)</title>
<updated>2024-02-14T17:39:59Z</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-02-14T17:39:59Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=d96bf9d522369eaf4ad57e607f134e51084ee1ad'/>
<id>urn:sha1:d96bf9d522369eaf4ad57e607f134e51084ee1ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore: query formatting</title>
<updated>2024-01-19T15:58:37Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2024-01-06T06:05:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9'/>
<id>urn:sha1:57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Python else elif dedent (#4618)</title>
<updated>2023-04-29T08:35:35Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2023-04-29T08:35:35Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=1ca9b938c1c3d8b2c64a168f6a5419b8f3870410'/>
<id>urn:sha1:1ca9b938c1c3d8b2c64a168f6a5419b8f3870410</id>
<content type='text'>
* feat(python): add interactive else/elif dedent

* fixup

* add test</content>
</entry>
<entry>
<title>feat(python): add break/continue dedent</title>
<updated>2023-03-25T04:31:57Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2023-03-25T00:51:41Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=c9ef5e58f7d59aba875324825ff47900d0be61f2'/>
<id>urn:sha1:c9ef5e58f7d59aba875324825ff47900d0be61f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(python): add match-case indents</title>
<updated>2023-03-25T04:31:57Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2023-03-25T00:29:32Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=1ffa01985651f6a5ba88d01e56f09cb76ff6e79a'/>
<id>urn:sha1:1ffa01985651f6a5ba88d01e56f09cb76ff6e79a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use indent.X syntax for captures and properties of set directives</title>
<updated>2023-03-24T17:07:53Z</updated>
<author>
<name>George Harker</name>
<email>george@george-graphics.co.uk</email>
</author>
<published>2023-03-20T21:44:39Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=cb568af5393241e5dbc9c19157c5df5e9ca9af2d'/>
<id>urn:sha1:cb568af5393241e5dbc9c19157c5df5e9ca9af2d</id>
<content type='text'>
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
</content>
</entry>
<entry>
<title>split delimiter into open_delimiter and close_delimiter</title>
<updated>2023-03-24T17:07:53Z</updated>
<author>
<name>George Harker</name>
<email>george@george-graphics.co.uk</email>
</author>
<published>2023-03-20T01:55:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=b4fcc611753bd443d30a75c1797a93268faa8aba'/>
<id>urn:sha1:b4fcc611753bd443d30a75c1797a93268faa8aba</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor(indent)!: Rework indent, aligned indent</title>
<updated>2023-03-24T17:07:53Z</updated>
<author>
<name>George Harker</name>
<email>george@george-graphics.co.uk</email>
</author>
<published>2023-03-20T01:09:18Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=d1333dd7e51729a581fed3e429fa035bff77a3db'/>
<id>urn:sha1:d1333dd7e51729a581fed3e429fa035bff77a3db</id>
<content type='text'>
indents now use @indent.X style captures, and indent.PROP for properties to set on those captures, as documented in the help.

Captures are:

indent.auto
indent.begin
indent.end
indent.dedent
indent.branch
indent.ignore
indent.align
indent.zero

Properties are:

indent.immediate
indent.start_at_same_line
indent.open_delimiter
indent.close_delimiter
indent.increment
indent.avoid_last_matching_next

Multiple opening delims on one line and multiple closing on a line are collapsed so as not to over indent,

The final line of @indent.align blocks which must in some cases be treated specially to avoid clashing with the next line is treated the same regardless of whether the @indent.align capture actually uses aligned indentation or just normal indentation. The indent.avoid_last_matching_next property controls this.

Adjust python to use these.

List, set, dict and tuple all use @indent.align which permits both hanging and aligned styles.

Finally, try: on it’s own will indent when typing live but make no guaranteeds about whole-file formatting.

Includes lucario387:fix-align-indent
</content>
</entry>
<entry>
<title>feat(python): add "return" patterns to @indent_end</title>
<updated>2023-03-16T12:41:19Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2023-03-16T10:04:17Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=01e8a5145160620140c3c57d285ccb2cfe067540'/>
<id>urn:sha1:01e8a5145160620140c3c57d285ccb2cfe067540</id>
<content type='text'>
`return ...` is usually the last line of a
function/statement, so mark some possible patterns of `return` with
`@indent_end` to dedent the line after it
</content>
</entry>
<entry>
<title>fix(python): add missing @indent_end</title>
<updated>2023-03-16T07:46:01Z</updated>
<author>
<name>Pham Huy Hoang</name>
<email>hoangtun0810@gmail.com</email>
</author>
<published>2023-03-15T23:39:58Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=f5ddd8f92e0222f96b88c6012453eee33e02728a'/>
<id>urn:sha1:f5ddd8f92e0222f96b88c6012453eee33e02728a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: change folding algorithm to fix Python indents</title>
<updated>2023-03-15T21:44:59Z</updated>
<author>
<name>George Harker</name>
<email>george@george-graphics.co.uk</email>
</author>
<published>2023-03-14T19:25:38Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=fa0644667ea7ee7a72efdb69c471de4953a11019'/>
<id>urn:sha1:fa0644667ea7ee7a72efdb69c471de4953a11019</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: Allow re-parsing in Python, XFAIL `\` indentation test</title>
<updated>2022-02-06T18:42:57Z</updated>
<author>
<name>Stephan Seitz</name>
<email>stephan.seitz@fau.de</email>
</author>
<published>2022-02-06T12:47:23Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=2caac447205be44edb761edf26385d4c42ef4070'/>
<id>urn:sha1:2caac447205be44edb761edf26385d4c42ef4070</id>
<content type='text'>
</content>
</entry>
<entry>
<title>indents: allow aligned_indent for unfinished calls in C and Python</title>
<updated>2022-02-05T17:54:55Z</updated>
<author>
<name>Stephan Seitz</name>
<email>stephan.seitz@fau.de</email>
</author>
<published>2022-01-22T13:50:51Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=059fbc487c62a5e109143254b720a5dc33201a34'/>
<id>urn:sha1:059fbc487c62a5e109143254b720a5dc33201a34</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(indent): support `@aligned_indent` for python</title>
<updated>2022-01-21T09:51:51Z</updated>
<author>
<name>Munif Tanjim</name>
<email>hello@muniftanjim.dev</email>
</author>
<published>2022-01-18T21:06:06Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=bb60706433e593f976fb6cfee3b3a6910ce5bd2c'/>
<id>urn:sha1:bb60706433e593f976fb6cfee3b3a6910ce5bd2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: rewrite indent module</title>
<updated>2022-01-21T09:51:51Z</updated>
<author>
<name>Munif Tanjim</name>
<email>hello@muniftanjim.dev</email>
</author>
<published>2022-01-18T15:17:26Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd'/>
<id>urn:sha1:c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>indent: add Python @ignore queries</title>
<updated>2021-01-14T12:54:43Z</updated>
<author>
<name>Jędrzej Boczar</name>
<email>yendreij@gmail.com</email>
</author>
<published>2021-01-07T23:54:54Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=e4f8e4147c32fe6b1dfd77ad15d49888738b3616'/>
<id>urn:sha1:e4f8e4147c32fe6b1dfd77ad15d49888738b3616</id>
<content type='text'>
</content>
</entry>
<entry>
<title>indent: add Python @return queries</title>
<updated>2021-01-14T12:54:43Z</updated>
<author>
<name>Jędrzej Boczar</name>
<email>yendreij@gmail.com</email>
</author>
<published>2021-01-07T23:33:15Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=e6b8c5e680fa11bee487230e1b8bc32b5aa647d5'/>
<id>urn:sha1:e6b8c5e680fa11bee487230e1b8bc32b5aa647d5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve python/indents.scm</title>
<updated>2020-12-21T21:58:17Z</updated>
<author>
<name>Jędrzej Boczar</name>
<email>yendreij@gmail.com</email>
</author>
<published>2020-12-20T11:42:11Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=ac42192e1995cdf51d5481e78c69ae0f34edb672'/>
<id>urn:sha1:ac42192e1995cdf51d5481e78c69ae0f34edb672</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update indents.scm</title>
<updated>2020-12-18T15:42:05Z</updated>
<author>
<name>Evan</name>
<email>esn89@users.noreply.github.com</email>
</author>
<published>2020-12-16T19:47:02Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=01baa52899bb262f95a981fc67e46da506bbcf82'/>
<id>urn:sha1:01baa52899bb262f95a981fc67e46da506bbcf82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Create indents.scm for python</title>
<updated>2020-12-18T15:42:05Z</updated>
<author>
<name>Evan</name>
<email>esn89@users.noreply.github.com</email>
</author>
<published>2020-12-16T17:42:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/nvim-treesitter/commit/?id=c200de65aa40b1a30e9319f65877fa64cf75aa26'/>
<id>urn:sha1:c200de65aa40b1a30e9319f65877fa64cf75aa26</id>
<content type='text'>
</content>
</entry>
</feed>
