Skip to content

Conversation

filipdutescu
Copy link
Owner

@filipdutescu filipdutescu commented May 15, 2022

Motivation

BREAKING CHANGE: Migrate the LSP buffer request from manual to using vim.lsp.buf.rename(...) to make the request and a custom LSP response handler to manage the custom response processing (eg setting the qf list) and the original Neovim rename handler to apply the requested changes.

This implies removing several existing function, doing some cleanup of tests and updating the documentation.

Fixes: GH-117, fixes: GH-121

Proposed changes

  • remove all buffer requests method
  • update renamer._setup(...) to change the default rename handler to the custom one
  • add custom handler
  • add custom handler test spec (lua/tests/renamer_rename_handler_spec.lua)

Test plan

Existing tests are updated to match the new functionality and a new spec is added to test the custom handler.

@filipdutescu filipdutescu added this to the 5.0.0 milestone May 15, 2022
@filipdutescu filipdutescu self-assigned this May 15, 2022
@github-actions github-actions bot added the feature New feature or request label May 15, 2022
@filipdutescu filipdutescu marked this pull request as draft May 15, 2022 10:59
@filipdutescu filipdutescu force-pushed the feature/migrate_to_handler branch from 27a808a to e10e9fc Compare May 17, 2022 19:41
@github-actions github-actions bot added the test label May 17, 2022
BREAKING CHANGE: Migrate the LSP buffer request from manual to using
`vim.lsp.buf.rename(...)` to make the request and a custom LSP response
handler to manage the custom response processing (eg setting the qf
list) and the original Neovim rename handler to apply the requested
changes.

This implies removing several existing function, doing some cleanup of
tests and updating the documentation.

Fixes: GH-117, GH-121
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
@filipdutescu filipdutescu force-pushed the feature/migrate_to_handler branch from e10e9fc to cf04479 Compare May 17, 2022 19:48
@filipdutescu filipdutescu marked this pull request as ready for review May 17, 2022 19:54
@filipdutescu filipdutescu merged commit 6c99bd9 into develop May 17, 2022
@filipdutescu filipdutescu deleted the feature/migrate_to_handler branch May 17, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Error when using <cmd>lua require("renamer").rename()<cr> [Bug] offset_encoding error when renaming
1 participant