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

Expand selection in VS Code doesn’t work correctly while the language mode is svelte. #556

Closed
KocsisGabor opened this issue Sep 23, 2020 · 4 comments
Assignees
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.

Comments

@KocsisGabor
Copy link

Expand selection is Shift+Alt+Right by default.

The expected behavior is demonstrated in the second half of the gif below.
It should expand the selection by tag/scope/bracket, etc… but works only inline and as soon as the selection should grow into multiple lines it selects the whole document.

No alternative solutions work with any of the extensions either (e.g.: expand-region).

This is what happens

System:

  • OS: Windows
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode
@KocsisGabor KocsisGabor added the bug Something isn't working label Sep 23, 2020
@jasonlyu123 jasonlyu123 added feature request New feature or request and removed bug Something isn't working labels Sep 23, 2020
@jasonlyu123
Copy link
Member

This is a feature request so I removed the bug label.

@jasonlyu123
Copy link
Member

Wondering if we should do this with svelte AST or HTML.

Downside of the former is it won't work when there's syntax errors. Or maybe somehow we could make it fallback to HTML.

@KocsisGabor
Copy link
Author

Personally I don’t mind at all if it only works when there is no syntax error.

This is not a real solution of course but until this issue is solved, we can use the “Emmet: Balance (outward)” command or a keyboard shortcut like this one:

{
  "key": "shift+alt+right",
  "command": "editor.emmet.action.balanceOut",
  "when": "editorTextFocus && editorLangId == svelte"
}

This is not equivalent to “expand selection” but it is better than nothing.

@jasonlyu123 jasonlyu123 self-assigned this Sep 27, 2020
dummdidumm pushed a commit that referenced this issue Oct 18, 2020
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Oct 18, 2020
@MartinBspheroid
Copy link

do we have any update on this? I used to use this a lot with React and Typescript and I guess some other people as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

4 participants