diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-05-05 23:56:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 23:56:00 +0200 |
commit | 55187de1157e05ea71c7c0404345dee0e27e963e (patch) | |
tree | 26992fedae9b7849990c047f83f1ed6f1dd91ea7 /test | |
parent | d14d308ce80df428393bccd36bdfd1c295e8f35f (diff) | |
download | rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.tar.gz rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.tar.bz2 rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.zip |
fix(lsp): fix rename capability checks and multi client support (#18441)
Adds filter and id options to filter the client to use for rename.
Similar to the recently added `format` function.
rename will use all matching clients one after another and can handle a
mix of prepareRename/rename support. Also ensures the right
`offset_encoding` is used for the `make_position_params` calls
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/fixtures/fake-lsp-server.lua | 4 | ||||
-rw-r--r-- | test/functional/plugin/lsp_spec.lua | 2 |
2 files changed, 0 insertions, 6 deletions
diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua index 0418ca7335..f589f5955f 100644 --- a/test/functional/fixtures/fake-lsp-server.lua +++ b/test/functional/fixtures/fake-lsp-server.lua @@ -222,10 +222,6 @@ function tests.prepare_rename_error() expect_request('textDocument/prepareRename', function() return {}, nil end) - expect_request('textDocument/rename', function(params) - assert_eq(params.newName, 'renameto') - return nil, nil - end) notify('shutdown') end; } diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index 530d414334..33a8976b79 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -2636,10 +2636,8 @@ describe('LSP', function() name = "prepare_rename_error", expected_handlers = { {NIL, {}, {method="shutdown", client_id=1}}; - {NIL, NIL, {method="textDocument/rename", client_id=1, bufnr=1}}; {NIL, {}, {method="start", client_id=1}}; }, - expected_text = "two", -- see test case }, }) do it(test.it, function() |