From 3201478b5ed74340820c66a05eb34ae39d0c9fa0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 1 Jun 2024 01:33:01 +0200 Subject: make NERDTree have own background color --- lua/functions.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lua/functions.lua') diff --git a/lua/functions.lua b/lua/functions.lua index 7d95ac3..0030b6c 100644 --- a/lua/functions.lua +++ b/lua/functions.lua @@ -81,6 +81,16 @@ function _G.toggle_terminal() end end +function _G.toggle_nerdtree() + vim.cmd("NERDTreeToggle") + + vim.api.nvim_win_set_option( + vim.fn.win_getid(), + "winhighlight", + "Normal:NERDTreeWindow" + ) +end + function _G.get_current_file() return vim.fn.expand("%") end -- cgit v1.2.3-18-g5258