mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
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.
This commit is contained in:
committed by
GitHub
parent
b2bad0ac91
commit
5c33815448
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user