Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sided region selection #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IndianBoy42
Copy link
Contributor

require'tsht'.nodes() can take {side = "start"|"end"}, similar to require'tsht'.move()

This reduces the hint labels to only that side, and when a hint is selected
instead of selecting the whole region, it selects from the current cursor to
the labeled key

I've definitely had use cases for it, like selecting/deleting/yanking/operating
on 'the rest' of the function, or argument list.

It's also a fairly small and non-intrusive change to the implementation. In
fact, while implementing this I was able to make a version of the move
function that doesn't depend on hop.nvim. Basically just make the
vim.cmd('normal! v') conditional. Is there any reason this wasn't done? I can
submit the PR too, if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant