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

Svelte VSCode doesn't register OnEnter Rules for indentation #236

Closed
b-fuze opened this issue Jun 28, 2020 · 2 comments · Fixed by #244
Closed

Svelte VSCode doesn't register OnEnter Rules for indentation #236

b-fuze opened this issue Jun 28, 2020 · 2 comments · Fixed by #244
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@b-fuze
Copy link
Contributor

b-fuze commented Jun 28, 2020

Describe the bug
The VSCode extension doesn't register OnEnter rules for auto indentation.

To Reproduce
Steps to reproduce the behavior:

Pressing enter with the cursor (|) here:

<div>|</div>

Produces this

<div>
|</div>

Expected behavior
Pressing enter with the cursor (|) here:

<div>|</div>

Should produce this (assuming 2 space indentation setting)

<div>
  |
</div>

System (please complete the following information):

Additional context
I patched the extension copy pasting the code from the HTML extension snippet below and it fixed the problem.

https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/extensions/html-language-features/client/src/htmlClient.ts#L209-L226

@b-fuze b-fuze added the bug Something isn't working label Jun 28, 2020
@dummdidumm
Copy link
Member

If you already did a fix you are welcome to make a PR 😃

b-fuze added a commit to b-fuze/language-tools that referenced this issue Jun 28, 2020
dummdidumm pushed a commit that referenced this issue Jun 29, 2020
* (fix) register OnEnter rules (#236)

* Silence ESLint errors, document regexes
@dummdidumm
Copy link
Member

Will be on Nightly in about 22 hours. Stable: tbd.

@dummdidumm dummdidumm reopened this Jun 29, 2020
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants