How to set TsServer's syntax analysis line terminator type?

40 Views Asked by At

I am using Tsserver for grammatical analysis, and by calling the semantic token service to complete some code coloring tasks.This way I can get an array containing offset, length and token type.

However, this offset is different from the calculation method of the UI control I am using. My UI control line terminator only supports LF, which causes the offset of the result I get to be larger than that displayed on the UI.

Therefore, I infer that the type of line terminator in the syntax analysis of TsServer is CRLF, right? If yes, how to set it to LF.

0

There are 0 best solutions below