nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects
Python: augmented_assignments
Nobody has claimed this yet.
- Dominant language
- Tree-sitter Query
- Stars
- 2.8k
- Forks
- 271
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
Currently, python queries cover only standard assignments like x = 1. Augmented assignments like x += 1 could be supported as well.
Describe the solution you'd like
Should be just a matter of adding something like
(augmented_assignment
left: (_) @assignment.lhs
right: (_) @assignment.inner @assignment.rhs) @assignment.outer
left: (_) @assignment.inner)
(augmented_assignment
left: (_) @assignment.inner)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Python query definitions used for assignments and compare the existing standard-assignment captures with the proposed augmented_assignment patterns. Verify how the captures are consumed, then ensure augmented assignments expose the intended lhs, inner, and rhs textobjects. Confirm the query behavior with the repository's available checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100