nvim-lsp-file-operations
is a Neovim plugin that adds support for file operations using built-in LSP
support.
This plugin works by subscribing to events emitted by nvim-tree.
But other integrations are possible.
WillRename requests supported in couple lsp-servers and allows to automagically apply some refactorings while you moving files around. Currently tested with metals and rust-analyzer.
scala.refactoring.example.mp4
If you have usecases for any other operations please open an issue.
Using packer.nvim
use {
'antosha417/nvim-lsp-file-operations',
requires = {
{ "nvim-lua/plenary.nvim" },
{ "kyazdani42/nvim-tree.lua" },
}
}
require("lsp-file-operations").setup()
This is equivalent to:
require("lsp-file-operations").setup {
-- used to see debug logs in file `vim.fn.stdpath("cache") .. lsp-file-operations.log`
debug = false
}
PRs are always welcome.