nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects
add support for @type to query/select type declarations and or type annotations
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.
no, it's purely to add more functionality, specifically being able to query type anotations for typed languages like c/c++ and gdscript
Describe the solution you'd like
add something like
(_
(type) @type)
Describe alternatives you've considered
I honostly haven't. I just created the above query as this is my first time making any at all.
Additional context
this should allow to query for type declarations in statically typed languages like c/c++
it should also be added for languages like gdscript that are dynamically typed but support type anotations.
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
Start with the proposed (_ (type) @type) query and determine whether it can represent type declarations and annotations in C/C++ and GDScript. Done means users can query those type-related nodes through an @type capture; the issue does not name files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100