mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #14014 from mfussenegger/textDocumentSync
LSP: Resolve text_document_save capability according to spec
This commit is contained in:
commit
0c7610cf9d
@ -938,7 +938,7 @@ function protocol.resolve_capabilities(server_capabilities)
|
|||||||
text_document_did_change = textDocumentSync;
|
text_document_did_change = textDocumentSync;
|
||||||
text_document_will_save = false;
|
text_document_will_save = false;
|
||||||
text_document_will_save_wait_until = false;
|
text_document_will_save_wait_until = false;
|
||||||
text_document_save = false;
|
text_document_save = true;
|
||||||
text_document_save_include_text = false;
|
text_document_save_include_text = false;
|
||||||
}
|
}
|
||||||
elseif type(textDocumentSync) == 'table' then
|
elseif type(textDocumentSync) == 'table' then
|
||||||
|
@ -333,6 +333,7 @@ describe('LSP', function()
|
|||||||
client.stop()
|
client.stop()
|
||||||
local full_kind = exec_lua("return require'vim.lsp.protocol'.TextDocumentSyncKind.Full")
|
local full_kind = exec_lua("return require'vim.lsp.protocol'.TextDocumentSyncKind.Full")
|
||||||
eq(full_kind, client.resolved_capabilities().text_document_did_change)
|
eq(full_kind, client.resolved_capabilities().text_document_did_change)
|
||||||
|
eq(true, client.resolved_capabilities().text_document_save)
|
||||||
end;
|
end;
|
||||||
on_exit = function(code, signal)
|
on_exit = function(code, signal)
|
||||||
eq(0, code, "exit code", fake_lsp_logfile)
|
eq(0, code, "exit code", fake_lsp_logfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user