0

I'm trying to get the line break type (CRLF or LF) of the client document, but can't find any reference to it in the docs. I need something like this in the server.ts file:

function validateTextDocument(textDocument) {
    return __awaiter(this, void 0, void 0, function* () {
        if (textDocument.lineBreak === "\n") {
            // ...
        }
    })
}

This is the last piece of information I need to finish my extension, can you please shed a light on this?

Thank you!

Fabiow
  • 11
  • 3

1 Answers1

0

I missed the obvious, the solution has nothing to do with LSP, you can find it here: Detecting type of line breaks

Fabiow
  • 11
  • 3
  • Maybe it's a good idea to explicitly state the answer (not just a link, that eventually goes dead) and then accept it. – DarkTrick Feb 16 '21 at 08:57