-
Hey 👋 I'm struggling to figure out what handles the rename popup inside of neo-tree so I can (hopefully) configure it so that pressing escape activates normal mode instead of quitting the pop-up entirely. I had a look at the full configuration and couldn't see any relevant options for this. I'm using LazyVim's defaults. For convenience, here is the full configuration that is being used: {
"nvim-neo-tree/neo-tree.nvim",
cmd = "Neotree",
keys = {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ toggle = true, dir = require("lazyvim.util").get_root() })
end,
desc = "Explorer NeoTree (root dir)",
},
{
"<leader>fE",
function()
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
},
deactivate = function()
vim.cmd([[Neotree close]])
end,
init = function()
vim.g.neo_tree_remove_legacy_commands = 1
if vim.fn.argc() == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
require("neo-tree")
end
end
end,
opts = {
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
use_libuv_file_watcher = true,
},
window = {
mappings = {
["<space>"] = "none",
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_empty = "",
folder_empty_open = "",
},
git_status = {
symbols = {
renamed = "",
unstaged = "",
},
},
},
},
config = function(_, opts)
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
} It's worth mentioning that I initially raised this inside of LazyVim but I realised I might have been barking down the wrong tree so I figured I'd raise it here before going back (LazyVim/LazyVim#1077) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm also interested in this native solution. So far, I've been using tmux to copy text instead. |
Beta Was this translation helpful? Give feedback.
-
Closing as #1043 has been merged into main: a64419d Thanks again for raising that PR! @LoneExile |
Beta Was this translation helpful? Give feedback.
Closing as #1043 has been merged into main: a64419d
Thanks again for raising that PR! @LoneExile