diff --git a/doc/neo-tree.txt b/doc/neo-tree.txt index be49813b..85edf27e 100644 --- a/doc/neo-tree.txt +++ b/doc/neo-tree.txt @@ -586,6 +586,12 @@ the config options are in a table bound to the `config` key: filesystem = { window = { mappings = { + ["/"] = { + "fuzzy_finder", + config = { + title = "Filter" -- An empty string hides the title + } + }, ["a"] = { "add", nowait = true diff --git a/lua/neo-tree/sources/common/filters/init.lua b/lua/neo-tree/sources/common/filters/init.lua index 8575c7eb..79d0336b 100644 --- a/lua/neo-tree/sources/common/filters/init.lua +++ b/lua/neo-tree/sources/common/filters/init.lua @@ -119,6 +119,9 @@ M.show_filter = function(state, search_as_you_type, keep_filter_on_submit) if search_as_you_type then popup_msg = "Filter:" end + if state.config.title then + popup_msg = state.config.title + end local width = vim.fn.winwidth(0) - 2 local row = height - 3 diff --git a/lua/neo-tree/sources/filesystem/lib/filter.lua b/lua/neo-tree/sources/filesystem/lib/filter.lua index 90e7d456..6cc33fdd 100644 --- a/lua/neo-tree/sources/filesystem/lib/filter.lua +++ b/lua/neo-tree/sources/filesystem/lib/filter.lua @@ -43,6 +43,9 @@ M.show_filter = function(state, search_as_you_type, fuzzy_finder_mode, use_fzy) popup_msg = "Filter:" end end + if state.config.title then + popup_msg = state.config.title + end if state.current_position == "float" then scroll_padding = 0 local width = vim.fn.winwidth(winid)