mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
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:

committed by
GitHub

parent
69103ff0cf
commit
1a6d89eb90
@@ -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
|
||||
|
Reference in New Issue
Block a user