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

Investigate Replay/Environment Undo Functionality for reloading a plugin #17

Open
miversen33 opened this issue Oct 25, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@miversen33
Copy link
Owner

Per #15 , research how difficult it is to do something like this. This issue will be updated with scope once I get to it.

@miversen33 miversen33 added the enhancement New feature or request label Oct 25, 2022
@miversen33 miversen33 linked a pull request Oct 29, 2022 that will close this issue
@miversen33 miversen33 added the help wanted Extra attention is needed label Oct 29, 2022
@miversen33 miversen33 self-assigned this Oct 29, 2022
@miversen33
Copy link
Owner Author

I've got a current theory on this, revolving around diffing vim.g, vim.w, vim.b, vim.t, and vim.v before and after a plugin is imported, and then saving the "revert" state with the plugins import. I haven't gotten around to testing this out because its kinda disgusting and I have been working on other things. But thats my current running theory on this

@ciesling
Copy link

ciesling commented Apr 3, 2024

@miversen33

Hello, this year I got rid of Windows completely. I am glad I ran into neovim pretty early on cus I thought it was neat to just use my 60 keyboard only to code. Then I found neovide and was blown away when I realized just how crippling my old windows os really was for the first time.

Do you know I can keep being a neovide chad while I edit my nvim dotfiles?

@miversen33
Copy link
Owner Author

Erm, what does this have to do with this issue?

@ciesling
Copy link

ciesling commented Apr 3, 2024

Sorry I seem to be misunderstanding. It was about not having to close and reopen neovide everytime i make a save in my nvim dot files to get it to update.

@miversen33
Copy link
Owner Author

Gotcha ok, I am following now.

This issue is a feature request for research into being able to properly "unload" a plugin so you can hot reload it "correctly". How import.nvim currently handles this it it just "nils" out the global table representation of a plugin and then re requires the plugin. It's not great but it "works" mostly.

All that said, as called out both in the readme and #21 import.nvim is deprecated. I am no longer updating this plugin. So if you are having issues with something you want, you might consider forking or looking into something like lazy.nvim which supports plugin reloading (I have no idea if folke solved this problem in a better way than I did but at the very least lazy has similar capability in terms of reloading).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants