Skip to content

Surrounding Function Rename: Trigger LSP #327

Description

@coxley

Summary

First, love this plugin.

I've relied too much on the built-in surround capabilities, mostly for changing content within. This is really cool for changing the surrounding characters/names themselves.

csf -> change surrounding function is awesome, but it isn't quite usable in an LSP environment. When using an LSP, you can issue vim.lsp.buf.rename() and be able to rename the closest token to your cursor. The new name will be updated everywhere in the project.

Is it possible to have the default handler invoke something similar? Or if anyone is familiar, simply recommend a way to do so? I looked into the vim API docs and didn't see a straightforward way to trigger an LSP rename without navigating to the token first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions