lsp: match textDocument/didChange eol behavior (#13792)

We should be consistent in sending the EOL character to servers(I think). Julia expects this to match on bufwrite, or it crashes when vim appends the newline during the write process.
This commit is contained in:
Michael Lingelbach
2021-01-25 08:52:40 -08:00
committed by GitHub
parent 69103ff0cf
commit 1a6d89eb90

View File

@@ -891,9 +891,7 @@ end
function lsp._text_document_did_save_handler(bufnr)
bufnr = resolve_bufnr(bufnr)
local uri = vim.uri_from_bufnr(bufnr)
local text = once(function()
return table.concat(nvim_buf_get_lines(bufnr, 0, -1, false), '\n')
end)
local text = once(buf_get_full_text)
for_each_buffer_client(bufnr, function(client, _client_id)
if client.resolved_capabilities.text_document_save then
local included_text