aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/textobject.rs
Commit message (Collapse)AuthorAge
* Add WORD textobject (#991)Omnikar2021-11-08
| | | | | * Add WORD textobject * Document WORD textobject
* Add treesitter textobjects (#728)Gokul Soumya2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | * Add treesitter textobject queries Only for Go, Python and Rust for now. * Add tree-sitter textobjects Only has functions and class objects as of now. * Fix tests * Add docs for tree-sitter textobjects * Add guide for creating new textobject queries * Add parameter textobject Only parameter.inside is implemented now, parameter.around will probably require custom predicates akin to nvim' `make-range` since we want to select a trailing comma too (a comma will be an anonymous node and matching against them doesn't work similar to named nodes) * Simplify TextObject cell init
* Fix around-word text-object selection. (#546)Nathan Vegdahl2021-08-06
| | | | | | | | | | | | | * Fix around-word text-object selection. * Text object around-word: select to the left if no whitespace on the right. Also only select around when there's whitespace at all. * Make select-word-around select all white space on a side. * Update commented-out test case. * Fix unused import warning from rebase.
* Fix buggy surround behavior from #376.Nathan Vegdahl2021-08-04
| | | | Fixes #543.
* Address some PR comments.Nathan Vegdahl2021-07-26
|
* Collect some common patterns into methods on `Range`.Nathan Vegdahl2021-07-26
|
* Update surround commands to work with gap indexing.Nathan Vegdahl2021-07-08
|
* Fix surround bug when cursor on same pairGokul Soumya2021-07-03
| | | | | | For example when the cursor is _on_ the `'` in `'word'`, the cursor wouldn't move because the search for a matching pair started _from_ the position of the cursor and simply found itself.
* Add object selection (textobjects) (#385)Gokul Soumya2021-07-03
* Add textobjects for word * Add textobjects for surround characters * Apply clippy lints * Remove ThisWordPrevBound in favor of PrevWordEnd It's the same as PrevWordEnd except for taking the current char into account, so use a "flag" to capture that usecase * Add tests for PrevWordEnd movement * Remove ThisWord* movements They did not preserve anchor positions and were only used for textobject boundary search anyway so replace them with simple position finding functions * Rewrite tests of word textobject * Add tests for surround textobject * Add textobject docs * Refactor textobject word position functions * Apply clippy lints on textobject * Fix overflow error with textobjects