diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2023-03-11 07:35:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 07:35:23 +0100 |
commit | 236c20795eb9f11e21e0719b735ea741711acc08 (patch) | |
tree | 746b3cef078547912948007d616beb3bbfadfe37 /test | |
parent | a7cd79349c97f623955f4a5cf84921ca8ab9ea42 (diff) | |
download | rneovim-236c20795eb9f11e21e0719b735ea741711acc08.tar.gz rneovim-236c20795eb9f11e21e0719b735ea741711acc08.tar.bz2 rneovim-236c20795eb9f11e21e0719b735ea741711acc08.zip |
revert: "fix(lsp): use buffer scheme for files not stored on disk" (#22604)
Although using `buffer://` for unsaved file buffers fixes issues with
language servers like eclipse.jdt.ls or ansible-language-server, it
breaks completion and signature help for clangd.
A regression is worse than a fix for something else, so this reverts
commit 896d672736b32a8f4a4fa51844b44f266dcdcc6c.
The spec change is also still in dicussion, see
https://github.com/microsoft/language-server-protocol/pull/1679#discussion_r1130704886
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/fixtures/fake-lsp-server.lua | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua index 9cc2f6fa27..5fb86d029d 100644 --- a/test/functional/fixtures/fake-lsp-server.lua +++ b/test/functional/fixtures/fake-lsp-server.lua @@ -272,7 +272,6 @@ function tests.text_document_save_did_open() end; body = function() notify('start') - expect_notification('textDocument/didClose') expect_notification('textDocument/didOpen') expect_notification('textDocument/didSave') notify('shutdown') @@ -293,8 +292,6 @@ function tests.text_document_sync_save_bool() end; body = function() notify('start') - expect_notification('textDocument/didClose') - expect_notification('textDocument/didOpen') expect_notification('textDocument/didSave', {textDocument = { uri = "file://" }}) notify('shutdown') end; @@ -316,8 +313,6 @@ function tests.text_document_sync_save_includeText() end; body = function() notify('start') - expect_notification('textDocument/didClose') - expect_notification('textDocument/didOpen') expect_notification('textDocument/didSave', { textDocument = { uri = "file://" @@ -464,7 +459,7 @@ function tests.basic_check_buffer_open() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n") .. '\n'; - uri = "buffer://"; + uri = "file://"; version = 0; }; }) @@ -491,13 +486,13 @@ function tests.basic_check_buffer_open_and_change() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n") .. '\n'; - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { @@ -527,13 +522,13 @@ function tests.basic_check_buffer_open_and_change_noeol() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n"); - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { @@ -562,13 +557,13 @@ function tests.basic_check_buffer_open_and_change_multi() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n") .. '\n'; - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { @@ -577,7 +572,7 @@ function tests.basic_check_buffer_open_and_change_multi() }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 4; }; contentChanges = { @@ -607,13 +602,13 @@ function tests.basic_check_buffer_open_and_change_multi_and_close() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n") .. '\n'; - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { @@ -622,7 +617,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close() }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 4; }; contentChanges = { @@ -631,7 +626,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close() }) expect_notification('textDocument/didClose', { textDocument = { - uri = "buffer://"; + uri = "file://"; }; }) expect_notification("finish") @@ -665,13 +660,13 @@ function tests.basic_check_buffer_open_and_change_incremental() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n") .. '\n'; - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { @@ -708,13 +703,13 @@ function tests.basic_check_buffer_open_and_change_incremental_editing() textDocument = { languageId = ""; text = table.concat({"testing"; "123"}, "\n"); - uri = "buffer://"; + uri = "file://"; version = 0; }; }) expect_notification('textDocument/didChange', { textDocument = { - uri = "buffer://"; + uri = "file://"; version = 3; }; contentChanges = { |