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

Wrong indentation in <script> #25

Open
DmitryMyadzelets opened this issue Feb 17, 2022 · 3 comments
Open

Wrong indentation in <script> #25

DmitryMyadzelets opened this issue Feb 17, 2022 · 3 comments

Comments

@DmitryMyadzelets
Copy link

How to reproduce:

  • In a svelte file type <script>. Enter. New line will have one-size indentation.
  • Type import foo from 'foo'. Enter.
  • New line will have two-sized indentation. Expected one-size indentation.

Versions:

  • vim v 8.2
  • vim-svelte plugin downloaded the 17 feb 2022.

I suspect it is nothing to do with the vim-svelte plugin. I use pangloss/vim-javascript plugin for JS. However, it seems that its up to the vim-svelte plugin to decide which plugin to use for the <script> section. If so, a hint in the documentation would be appreciated.

@evanleck
Copy link
Owner

@DmitryMyadzelets I've been trying to improve the HTML indent behavior and found that adding othree/html5.vim fixes some issues. Mind giving that a shot and letting me know how it works? I've updated the README to include html5.vim as a dependency of this plugin as well.

@bikubi
Copy link

bikubi commented Feb 18, 2022

had the same (or similar) problem, including the html5 plugin fixed it.

EDIT: following up, i think this might've also improved my vue plugin. ...could this be related to vim/vim#7215 ?

@evanleck
Copy link
Owner

@bikubi yeah, seems likely they're related

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