vim-polyglot icon indicating copy to clipboard operation
vim-polyglot copied to clipboard

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

Open mallochine opened this issue 1 year ago • 0 comments

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

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 avatar Jun 02 '23 23:06 mallochine