You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a strange issue when triggering a completion with v0.97.0 - it looks like the Flow LSP is sending back character offsets based on 1 instead of 0, as found here (thanks to @yyoncho for investigating this!). This results in broken code after triggering the completion (see the GIF below).
When triggering a completion, I expect the result code to be correct.
Actual behavior
On a very brief investigation into the PR that introduced this change, I think this behaviour could be caused by this line, but I could be wrong; my OCaml knowledge is non-existent.
Let me know if there's something I can configure on the LSP server to fix this behaviour. Thank you!
The text was updated successfully, but these errors were encountered:
I think you're right about that logic being the problem. Looking at the lsp spec, the textEdit range should denote the text to replace i.e. you've already typed part of the completion. So:
x.|
start.character = character // 2
end.character = character // 2
x.toEx|
start.character = character - 4 // 2
end.character = character // 6
Hello!
I'm having a strange issue when triggering a completion with v0.97.0 - it looks like the Flow LSP is sending back character offsets based on 1 instead of 0, as found here (thanks to @yyoncho for investigating this!). This results in broken code after triggering the completion (see the GIF below).
Environment
Flow version:
v0.97.0
Client: Emacs +
lsp-mode
+company-lsp
Expected behavior
When triggering a completion, I expect the result code to be correct.
Actual behavior
On a very brief investigation into the PR that introduced this change, I think this behaviour could be caused by this line, but I could be wrong; my OCaml knowledge is non-existent.
Let me know if there's something I can configure on the LSP server to fix this behaviour. Thank you!
The text was updated successfully, but these errors were encountered: