Skip to content

automatic save format issue #42

@jhshiyi

Description

@jhshiyi

here are my lsp-html settings

{
    "settings": {
        "javascript.format.semicolons": "insert",
    }
}

I want to automatically format the code as I save to add a semicolon at the end of each line.

example:

// right
<script>
var a = 1;
var b = 2;
</script>

but the results are not what I expected.
The result is this:

// wrong
<script>
var a = 1;
var b = 2 // The last line does not append a semicolon
</script>

or:

<script>
var a = 1 // No semicolons are appended when there is only one line
</script>

What changes do I need to set?

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamCaused by upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions