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

add support for selectionRange command #319

Open
ananthakumaran opened this issue Jun 1, 2019 · 2 comments
Open

add support for selectionRange command #319

ananthakumaran opened this issue Jun 1, 2019 · 2 comments

Comments

@ananthakumaran
Copy link
Owner

TypeScript 3.5 added selectionRange command which provides functionality similar to https://github.com/magnars/expand-region.el

@josteink
Copy link
Collaborator

josteink commented Jun 1, 2019

I saw this too in the TS3.5 announcement and was conflicted about creating an issue for it or not.

Looking at the expand-region code though, it seems to provide mode-specific implementations for each major mode it supports.

While tide is a minor-mode, wouldn't the correct thing to do, be for us to provide a tide-mode implementation for expand-region, instead of doing our own thing?

The way I see it now:

  1. we create a defun for tide-expand-region.
  2. we create a PR for expand-region to use this function when tide-mode is active.
  3. existing expand-region users won't need to setup any new or typescript-mode specific keybindings for this functionality.

Any opinions? Sounds good?

@MarcusRiemer
Copy link

I am not quite sure whether I really like the way selectionRange behaves and I love the way tide allows me to do things "on demand" instead of hijacking default actions. So properly boundling this with a mode sounds like the way to go for me.

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

No branches or pull requests

3 participants