Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Rename file to match type" code action not working #454

Closed
Confuset opened this issue Mar 27, 2019 · 3 comments
Closed

"Rename file to match type" code action not working #454

Confuset opened this issue Mar 27, 2019 · 3 comments

Comments

@Confuset
Copy link

hey,
when i try to rename a file to match the class/interface name in it with a omnisharp-roslyn code action nothing happens.

I only receive the message "No actions taken"

@JohanBjoerklund
Copy link

JohanBjoerklund commented May 3, 2019

What project structure do you use, Core or full framework?
When using full framework, it does not create a <Compile Include="Path/To/File.cs" /> entry in the .csproj file, but everything else works fine for me.

@nickspoons
Copy link
Member

nickspoons commented Feb 27, 2020

Renaming a file is outside OmniSharp-roslyn's scope, so we'll need to do a bit more work on the OmniSharp-vim side. I haven't looked into this but I expect the OmniSharp-roslyn response will contain the new filename, and we should use that to perform the rename. We might be able to take some inspiration from vim-eunuch's :Rename functionality.

@nickspoons
Copy link
Member

It turns out this is not out of OmniSharp-roslyn's scope at all - it is actually the server that deletes the old file and creates the new one. But we needed to request it properly and handle the buffers tidily on our end. Done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants