Closed kyoh86 closed 3 months ago
I'm having quite a bit of trouble, can anyone at least give me the maintainer's opinion?
coc.nvim follows the spec, but the applyEdits
function follows how VSCode does. VSCode becomes the de-facto implementation and the servers responded in order, the client shouldn't do re-ordering. This change will break all servers.
Now the coc.nvim client may do re-ordering.
It has fixed in Neovim, thanks.
Result from CocInfo
Describe the bug
Text edits returned from the LSP that have the same start position are being applied in reverse. According to the spec, text edits with the same start position should be applied in the order received.
Recently, the language server client included with Neovim has fixed this bug (https://github.com/neovim/neovim/issues/29202)
Accordingly, using some servers (e.g. efm-langserver) with the client included with Neovim, the formatted lines of the result may be reversed. So I tried to ask the server to fix it (https://github.com/mattn/efm-langserver/issues/281), but the fix causes problems with other (non-specified) clients such as coc.nvim. Therefore, I would like you to implement a fix in coc.nvim that follows the spec, as well as Neovim.
Reproduce the bug
~/.config/nvim-app/i29392/init.vim
~/.config/nvim-app/i29392/coc-settings.json
~/.config/efm-langserver/config.toml
:w
Expected result:
But actual result:
If you install the efm-langserver without the patch, this doesn't happen.