]> Sergey Matveev's repositories - vim-lsp.git/commit
Take the original sorting into account when sorting textedits
authorAndreas Louv <andreas@louv.dk>
Wed, 12 Apr 2023 18:29:06 +0000 (20:29 +0200)
committerAndreas Louv <andreas@louv.dk>
Wed, 12 Apr 2023 18:29:08 +0000 (20:29 +0200)
commit1324afa24d419bddc1f02f678d7d53e95c9fbafe
tree7531aa2faba114335436aaec8ab19382bb96941a
parent0f24ef2642aec0615871789323e9ab5bbc6ffb1b
Take the original sorting into account when sorting textedits

Some language servers like "efm-langserver" configured with "prettier"
will provide multiple textedits for the same line and column, these are
actually sorted "correctly" but since we apply the changes in reverse we
need to also take the original sorting into account.

The range provided is something like:

    { start: { line: 10, character: 0 }, end: { line: 10, character: 0 } }

and this is the LSP servers way to provide an insert.
autoload/lsp/textedit.vim