aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/_changetracking.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2024-05-30 10:46:26 +0200
committerGitHub <noreply@github.com>2024-05-30 10:46:26 +0200
commit5c33815448e11b514678f39cecc74e68131d4628 (patch)
tree98375094ca5cf9e5d035db555f08e75dd7c1d822 /runtime/lua/vim/lsp/_changetracking.lua
parentb2bad0ac91ddb9b33c3547b6fd4f7278794818d9 (diff)
downloadrneovim-5c33815448e11b514678f39cecc74e68131d4628.tar.gz
rneovim-5c33815448e11b514678f39cecc74e68131d4628.tar.bz2
rneovim-5c33815448e11b514678f39cecc74e68131d4628.zip
refactor(lsp): replace util.buf_versions with changedtick (#28943)
`lsp.util.buf_versions` was already derived from changedtick (`on_lines` from `buf_attach` synced the version) As far as I can tell there is no need to keep track of the state in a separate table.
Diffstat (limited to 'runtime/lua/vim/lsp/_changetracking.lua')
-rw-r--r--runtime/lua/vim/lsp/_changetracking.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/_changetracking.lua b/runtime/lua/vim/lsp/_changetracking.lua
index b2be53269f..ce701f0772 100644
--- a/runtime/lua/vim/lsp/_changetracking.lua
+++ b/runtime/lua/vim/lsp/_changetracking.lua
@@ -1,6 +1,5 @@
local protocol = require('vim.lsp.protocol')
local sync = require('vim.lsp.sync')
-local util = require('vim.lsp.util')
local api = vim.api
local uv = vim.uv
@@ -277,7 +276,7 @@ local function send_changes(bufnr, sync_kind, state, buf_state)
client.notify(protocol.Methods.textDocument_didChange, {
textDocument = {
uri = uri,
- version = util.buf_versions[bufnr],
+ version = vim.b[bufnr].changedtick,
},
contentChanges = changes,
})