From 80f7040580b1edab88f2c3f37657ef6407e4b212 Mon Sep 17 00:00:00 2001 From: Abu Abacus Date: Mon, 6 Jan 2025 14:51:56 +0100 Subject: [PATCH] NVim-Tree --- lua/roka/core/plugins.lua | 13 ++++++++++++- lua/roka/plug/nvim-tree.lua | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 lua/roka/plug/nvim-tree.lua diff --git a/lua/roka/core/plugins.lua b/lua/roka/core/plugins.lua index a817466..ea2ca31 100644 --- a/lua/roka/core/plugins.lua +++ b/lua/roka/core/plugins.lua @@ -104,7 +104,18 @@ return packer.startup(function(use) end } - -- -------------------------------------------------------------- + -- ---------------------------------------------------- + -- nvim-tree + -- ---------------------------------------------------- + use { + "nvim-tree/nvim-tree.lua", + + config = function() + require( "roka.plug.nvim-tree") + end + } + + -- -------------------------------------------------------------- -- autocompletion -- -------------------------------------------------------------- use { diff --git a/lua/roka/plug/nvim-tree.lua b/lua/roka/plug/nvim-tree.lua new file mode 100644 index 0000000..b365902 --- /dev/null +++ b/lua/roka/plug/nvim-tree.lua @@ -0,0 +1,34 @@ +local setup, nvimtree = pcall( require, "nvim-tree") +if not setup then + return +end + +-- recommended settings from nvim-tree documentation +vim.g.loaded = 1 +vim.g.loaded_netrwPlugin = 1 + +vim.cmd( [[ highlight NvimTreeIndentMarker guifg = #3FC5FF ]]) + +nvimtree.setup({ + renderer = { + icons = { + glyphs = { + folder = { + arrow_closed = "→", + arrow_open = "↓", + }, + }, + }, + }, + + -- disable window_picker for explorer + -- to work well with window splits + actions = { + open_file = { + window_picker = { + enable = false, + }, + }, + }, +}) +