diff --git a/lua/config/icons.lua b/lua/config/icons.lua index 2b54c1b..9d7fcad 100644 --- a/lua/config/icons.lua +++ b/lua/config/icons.lua @@ -28,5 +28,11 @@ return { folds = { open = '', closed = '' - } + }, + folder = { + closed = '', + open = '', + empty = '' + }, + file = '' } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index a35e2f7..4825d87 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -10,7 +10,8 @@ -- -- ============================================== -ui = require 'config.ui' +local ui = require 'config.ui' +local icons = require 'config.icons' return { "nvim-neo-tree/neo-tree.nvim", @@ -25,12 +26,12 @@ return { opts = { popup_border_style = ui.border, diagnostics = { - follow_current_file = { -- May also be set to `true` or `false` - enabled = true, -- This will find and focus the file in the active buffer every time + follow_current_file = { -- May also be set to `true` or `false` + enabled = true, -- This will find and focus the file in the active buffer every time always_focus_file = false, -- Focus the followed file, even when focus is currently on a diagnostic item belonging to that file - expand_followed = true, -- Ensure the node of the followed file is expanded - leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` - leave_files_open = true, -- `false` closes auto expanded files, such as with `:Neotree reveal` + expand_followed = true, -- Ensure the node of the followed file is expanded + leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + leave_files_open = true, -- `false` closes auto expanded files, such as with `:Neotree reveal` } }, filesystem = { @@ -59,9 +60,15 @@ return { indent_marker = "│", last_indent_marker = "└", with_expanders = true, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", + expander_collapsed = icons.folds.open, + expander_expanded = icons.folds.closed, expander_highlight = "NeoTreeExpander", + }, + icon = { + folder_closed = icons.folder.closed, + folder_open = icons.folder.open, + folder_empty = icons.folder.empty, + default = icons.file } } }