You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're not using a file explorer, the current alternative would be to manually call `:PympleUpdateImports <source> <destination>` after the file rename operation which will bring up the confirmation window mentioned above.
100
100
101
+
### 🍰 Using LazyVim
102
+
103
+
When running **LazyVim**, you may need to forward Neo‑tree’s rename events to *pymple* so that automatic import updates kick in.
104
+
Drop the snippet below into your `lazy.nvim` spec (e.g. `plugins/neo-tree.lua`):
105
+
106
+
```lua
107
+
{
108
+
"nvim-neo-tree/neo-tree.nvim",
109
+
opts=function(_, opts)
110
+
localapi=require("pymple.api")
111
+
localconfig=require("pymple.config")
112
+
113
+
localfunctionon_move(args)
114
+
api.update_imports(
115
+
args.source,
116
+
args.destination,
117
+
config.user_config.update_imports
118
+
)
119
+
end
120
+
121
+
localevents=require("neo-tree.events")
122
+
opts.event_handlers=opts.event_handlersor {}
123
+
vim.list_extend(opts.event_handlers, {
124
+
{ event=events.FILE_MOVED, handler=on_move },
125
+
{ event=events.FILE_RENAMED, handler=on_move },
126
+
})
127
+
end,
128
+
},
129
+
```
130
+
101
131
### 🦀 Import resolution
102
132
By default, pymple will setup a keymap for this (`<leader>li`) which you can change in the configuration:
0 commit comments