Open kyoh86 opened 2 weeks ago
In the golang/tools, the ComputeEdits
is being used only as testing util....
https://github.com/golang/tools/blob/d9c6af3f039a6193d1557d780752f223b3978173/internal/diff/myers/diff.go
It is deprecated in the golang/tools. I think it would be better to re-implement using google/go-cmp or something similar.
The reason for the deprecated status was not related to this project, so I think that we can continue to use the ComputeEdits
as it is.
https://github.com/mattn/efm-langserver/pull/282#issuecomment-2227157623
I had neglected to mention that this change would affect other clients as well. At a minimum I would check for the following clients
- vim-lsp
- coc.nvim
- Eglot
- Helix
- VSCode
Since it will take time to verify all environments, we will withdraw the request and ask for another review after the investigation.
If anybody could help me for testing them, give me your help.
I will try to check this issue using Eglot.
:memo: I finished testing for vim-lsp, helix and coc.nvim.
I checked Eglot. It worked the same way as vim-lsp.
In LSP spec, an order of the text-edits which have the same start position should be applied in order of them. Neovim LSP client was applied them in reversed order, but it's fixed in https://github.com/neovim/neovim/issues/29202. So now, formatting some continuous lines with efm-langserver, text lines are reversed. Please see the issue https://github.com/neovim/neovim/issues/29392 for steps to reproduce and details.