Skip to content

textDocument/formatting should return a edits instead of totall text for client #1049

Open
@kevinhwang91

Description

@kevinhwang91

Describe the bug
https://github.com/sumneko/lua-language-server/blob/f760dc359b389c20a0d48bef463d14800e67894c/script/core/formatting.lua#L5-L25

As a server, we should diff the document and the return result and generate the edits for the client.
If the server returns totally text result, the context resource in the client may be invalid, like semantic token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions