nvim-tree / nvim-tree/nvim-tree.lua

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

Open
#2,836 2 comments 0 reactions 1 assignee View on GitHub

@Uanela is already working on this.

Since Jun 16, 2026.

Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

  • #2255

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:

  • skip it
  • mention it in a comment on this issue
  • raise a new issue similar to #2829 (situational)

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.