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

Indent JS code correctly (JS is embedded in PHP file) #838

Open
mallochine opened this issue Jun 2, 2023 · 0 comments
Open

Indent JS code correctly (JS is embedded in PHP file) #838

mallochine opened this issue Jun 2, 2023 · 0 comments

Comments

@mallochine
Copy link

Does this bug happen when you install plugin without vim-polyglot?

no

Describe the bug:

When indenting on a new line after function foo() {, which is JS code in a <script> tag in a PHP file, it does not autoindent.

So that I get the following erroneous snippet instead of the 2nd snippet which is expected.

<?php
// foo
?>
<script>
function asdf() {
asdf
}
</script>
<?php
// foo
?>
<script>
function asdf() {
  asdf
}
</script>

To Reproduce:

In normal-mode, I press o on the line function asdf and the indent doesn't happen.

@mallochine mallochine changed the title Indent JS code correctly. JS is embedded in PHP file. Indent JS code correctly (JS is embedded in PHP file) Jun 2, 2023
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

1 participant