Add support to configure custom text objects
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Today we lack support for treesitter text objects like
- Inside Function
- Around Function
Rather than this plugin try to build these text objects, another suggestion is open up for registering text object commands via settings into this plugin
This way other plugins can provide support to implement new text-object implementations and configure them
I would like to explore the possibility to
-
Create a new type of TextObject which is configured for each configuration found in the settings. This new type will take the TextObject.keys from a provided key array in the setting object and a vscode command id. The command represented by the id must have a return type of
Omit<IMovement, "removed">. -
The settings will follow a schema as follows
"vim.textobjects": [
{
"keys": ["a", "f"]
"command" : ["x.arround.function"]
}
]
- When we load settings, we will load these text objects into actions map.
If the idea sounds good let me know, I can provide a PR for this suggestion.
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 by tracing how settings are loaded and how the actions map currently registers text objects. Review the existing TextObject types and command-handling paths before deciding how the proposed keys and command settings fit them. Done means configured command-backed text objects can be registered from the documented settings schema and invoked through their configured keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100