From 4303d86e7fb79301fd3386e672fac7bdb669bb22 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 7 Jan 2024 15:32:57 +0100 Subject: [PATCH] Neovim: Add neotree styling --- home/features/coding/nvim/default.nix | 1 + home/features/coding/nvim/plugin/neo-tree.lua | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 home/features/coding/nvim/plugin/neo-tree.lua diff --git a/home/features/coding/nvim/default.nix b/home/features/coding/nvim/default.nix index 4df15d3..0283830 100644 --- a/home/features/coding/nvim/default.nix +++ b/home/features/coding/nvim/default.nix @@ -144,6 +144,7 @@ in { nui-nvim { plugin = neo-tree-nvim; + config = builtins.readFile ./plugin/neo-tree.lua; type = "lua"; } diff --git a/home/features/coding/nvim/plugin/neo-tree.lua b/home/features/coding/nvim/plugin/neo-tree.lua new file mode 100644 index 0000000..15442aa --- /dev/null +++ b/home/features/coding/nvim/plugin/neo-tree.lua @@ -0,0 +1,19 @@ +require("neo-tree").setup({ + close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab + hide_root_node = true, -- Hide the root node + filesystem = { + filtered_items = { + visible = false, + hide_dotfiles = false, + hide_gitignored = false, + hide_by_name = { + ".git", + ".DS_Store", + "thumbs.db", + }, + show_hidden_count = false, + }, + }, +}) + +vim.keymap.set("n", "", "Neotree toggle")