mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
docs(rename): add oil.nvim integration (#1006)
## Description Add an autocmd for oil.nvim integration of snacks.rename to the docs, similar to mini.files.
This commit is contained in:
parent
93ad23a0ab
commit
c5060a801c
1 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,19 @@ vim.api.nvim_create_autocmd("User", {
|
|||
})
|
||||
```
|
||||
|
||||
## [oil.nvim](https://github.com/stevearc/oil.nvim)
|
||||
|
||||
```lua
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "OilActionsPost",
|
||||
callback = function(event)
|
||||
if event.data.actions.type == "move" then
|
||||
Snacks.rename.on_rename_file(event.data.actions.src_url, event.data.actions.dest_url)
|
||||
end
|
||||
end,
|
||||
})
|
||||
```
|
||||
|
||||
## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim)
|
||||
|
||||
```lua
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue