Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jdtls: Add workaround for textDocument version of 0
Browse files Browse the repository at this point in the history
dradtke committed Mar 30, 2021
1 parent a59ec2e commit 362967c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/lspconfig/jdtls.lua
Original file line number Diff line number Diff line change
@@ -99,6 +99,15 @@ configs[server_name] = {
end
end

-- Workaround for https://github.com/eclipse/eclipse.jdt.ls/issues/1695
if action.edit.documentChanges ~= nil then
for _,change in ipairs(action.edit.documentChanges) do
if change.textDocument ~= nil and change.textDocument.version == 0 then
change.textDocument.version = nil
end
end
end

handlers['textDocument/codeAction'](a, b, actions)
end;
['language/status'] = vim.schedule_wrap(on_language_status)

0 comments on commit 362967c

Please sign in to comment.