-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(lsp): replace util.buf_versions with changedtick #28943
Conversation
Also: https://sourcegraph.com/search?q=context:global+vim.lsp.util.buf_versions&patternType=keyword&sm=0 Could do something like ---@nodoc
---@deprecated
M.buf_versions = setmetatable({}, {
__index = function(_, bufnr)
vim.notify_once("vim.lsp.util.buf_versions is deprecated", vim.log.levels.WARN)
return vim.b[bufnr].changedtick
end
}) |
077daeb
to
1613f60
Compare
Might make sense to hide the function M.buf_version(bufnr)
return vim.b[bufnr].changedtick
end This way it can be changed in the future without breaking anything. |
7e89e6e
to
c8e06c3
Compare
I don't think that's necessary and it would defeat the purpose of this PR (getting rid of unnecessary extra API). |
`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.
c8e06c3
to
dfb4fbf
Compare
`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.
…ovim#28943)" This reverts commit 5c33815.
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.