From 3b5bc69917ee7e808eef0fc9734693d0141ea474 Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Fri, 26 Apr 2024 20:25:50 +0300 Subject: [PATCH] feat(nvim): allow yazi.nvim to open directories with "nvim ." --- .config/nvim/lua/plugins/my-file-manager.lua | 56 ++++++++++++-------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/.config/nvim/lua/plugins/my-file-manager.lua b/.config/nvim/lua/plugins/my-file-manager.lua index d4b8233b..dc34eb07 100644 --- a/.config/nvim/lua/plugins/my-file-manager.lua +++ b/.config/nvim/lua/plugins/my-file-manager.lua @@ -1,30 +1,40 @@ ---@type LazySpec return { - "mikavilpas/yazi.nvim", - -- dir = "~/git/yazi.nvim/", - dependencies = { - "nvim-lua/plenary.nvim", - }, - event = "VeryLazy", - keys = { - { - "", - function() - require("yazi").yazi() - end, - desc = "Open the file manager", + { + "mikavilpas/yazi.nvim", + -- dir = "~/git/yazi.nvim/", + dependencies = { + "nvim-lua/plenary.nvim", + }, + event = "VeryLazy", + keys = { + { + "", + function() + require("yazi").yazi() + end, + desc = "Open the file manager", + }, + { + "", + function() + require("yazi").yazi(nil, vim.fn.getcwd()) + end, + desc = "Open the file manager in the cwd", + }, }, - { - "", - function() - require("yazi").yazi(nil, vim.fn.getcwd()) - end, - desc = "Open the file manager in the cwd", + ---@type YaziConfig + opts = { + open_for_directories = true, + enable_mouse_support = true, }, }, - ---@type YaziConfig - opts = { - open_for_directories = true, - enable_mouse_support = true, + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + filesystem = { + hijack_netrw_behavior = "disabled", + }, + }, }, }