Skip to content

Multi Instance: Refactor: remove simple core.get_explorer() usages #2836

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

Open
alex-courtis opened this issue Jul 14, 2024 · 0 comments
Open

Comments

@alex-courtis
Copy link
Member

alex-courtis commented Jul 14, 2024

core.get_explorer() is not possible in a multi instance world. An Explorer instance should always be available and used.

Remove usages, replacing with:

  • explorer from node or containing class
  • explorer passed from the caller
  • node.explorer passed from the caller

If the replacement is non-trivial or would require the caller to be converted to an explorer member class please:

Usages at 2025-03-21

lua/nvim-tree/actions/finders/find-file.lua
lua/nvim-tree/actions/finders/search-node.lua
lua/nvim-tree/actions/fs/create-file.lua
lua/nvim-tree/actions/fs/remove-file.lua
lua/nvim-tree/actions/fs/rename-file.lua
lua/nvim-tree/actions/fs/trash.lua
lua/nvim-tree/actions/moves/item.lua
lua/nvim-tree/actions/moves/sibling.lua
lua/nvim-tree/actions/root/change-dir.lua
lua/nvim-tree/actions/tree/find-file.lua
lua/nvim-tree/actions/tree/modifiers/collapse-all.lua
lua/nvim-tree/actions/tree/modifiers/expand-all.lua
lua/nvim-tree/api.lua
lua/nvim-tree/diagnostics.lua
lua/nvim-tree/explorer/filters.lua
lua/nvim-tree/lib.lua
lua/nvim-tree/utils.lua
lua/nvim-tree/view.lua
@alex-courtis alex-courtis converted this from a draft issue Jul 14, 2024
@alex-courtis alex-courtis changed the title Multi Instance: Refactor: remove core.get_explorer() usages Multi Instance: Refactor: remove simple core.get_explorer() usages Mar 20, 2025
@alex-courtis alex-courtis moved this from Backlog to Ready in Multiple Instances Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant