Skip to content

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

@alex-courtis

Description

@alex-courtis

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/lib.lua
lua/nvim-tree/utils.lua
lua/nvim-tree/view.lua

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions