Swap out nvim-tree with oil.nvim
Better plugin for what I want instead of trying to kludge a tree sidebar plugin into a vinegar-style plugin.
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
require('nvim-tree').setup({
|
||||
hijack_netrw = true,
|
||||
hijack_directories = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
view = {
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = "<CR>", action = "edit_in_place" },
|
||||
{ key = "<C-i>", action = "toggle_file_info" },
|
||||
}
|
||||
}
|
||||
},
|
||||
remove_keymaps = {
|
||||
'<C-k>'
|
||||
},
|
||||
})
|
||||
|
||||
local function toggle_replace()
|
||||
local view = require("nvim-tree.view")
|
||||
if view.is_visible() then
|
||||
view.close()
|
||||
else
|
||||
require("nvim-tree").open_replacing_current_buffer()
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '-', function() toggle_replace() end, { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>n', [[<Cmd>NvimTreeToggle<CR>]], { noremap = true, silent = true, desc = "Toggle [N]vim Tree" })
|
||||
3
lua/plugins/oil-nvim.lua
Normal file
3
lua/plugins/oil-nvim.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
require("oil").setup()
|
||||
|
||||
vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })
|
||||
Reference in New Issue
Block a user