Skip to content

BUG: Filter doesn't work #1459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
asynchroza opened this issue May 5, 2024 · 3 comments
Closed
3 tasks done

BUG: Filter doesn't work #1459

asynchroza opened this issue May 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@asynchroza
Copy link

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

NVIM v0.9.5

Operating System / Version

MacOS Sonoma 14.4.1

Describe the Bug

Filter doesn't seem to be doing anything. No exception messages are shown, but no results are returned.

Screenshots, Traceback

image

Steps to Reproduce

  1. Pull my config -> https://github.com/asynchroza/nvim-config
  2. Open neo-tree
  3. Try to filter by .lua extension.

Expected Behavior

It should display all files including .lua

Your Configuration

-- references:
-- https://github.com/nvim-neo-tree/neo-tree.nvim
-- https://github.com/nvim-neo-tree/neo-tree.nvim/wiki/Recipes
return {
	"nvim-neo-tree/neo-tree.nvim",
	dependencies = {
		"nvim-lua/plenary.nvim",
		"nvim-tree/nvim-web-devicons",
		"MunifTanjim/nui.nvim",
	},
	event = "VeryLazy",
	keys = {
		{ "<leader>e", ":Neotree position=float reveal_force_cwd<CR>", silent = true, desc = "Float File Explorer" },
		{ "<leader><tab>", ":Neotree toggle left<CR>", silent = true, desc = "Left File Explorer" },
	},
	config = function()
		require("neo-tree").setup({
			close_if_last_window = true,
			popup_border_style = "single",
			enable_git_status = true,
			enable_modified_markers = true,
			enable_diagnostics = true,
			sort_case_insensitive = true,
			default_component_configs = {
				indent = {
					with_markers = true,
					with_expanders = true,
				},
				modified = {
					symbol = "",
					highlight = "NeoTreeModified",
				},
				icon = {
					folder_closed = "",
					folder_open = "",
					folder_empty = "",
					folder_empty_open = "",
				},
				git_status = {
					symbols = {
						-- Change type
						added = "",
						deleted = "",
						modified = "",
						renamed = "",
						-- Status type
						untracked = "",
						ignored = "",
						unstaged = "",
						staged = "",
						conflict = "",
					},
				},
			},
			window = {
				position = "float",
				width = 35,
			},
			filesystem = {
				follow_current_file = {
					enabled = true,
					leave_dirs_open = false,
				},
				use_libuv_file_watcher = true,
				filtered_items = {
					hide_dotfiles = false,
					hide_gitignored = false,
					hide_by_name = {
						"node_modules",
					},
					never_show = {
						".DS_Store",
						"thumbs.db",
					},
				},
				buffers = {
					follow_current_file = true,
					leave_dirs_open = false,
				},
			},
			event_handlers = {
				{
					event = "neo_tree_window_after_open",
					handler = function(args)
						if args.position == "left" or args.position == "right" then
							vim.cmd("wincmd =")
						end
					end,
				},
				{
					event = "neo_tree_window_after_close",
					handler = function(args)
						if args.position == "left" or args.position == "right" then
							vim.cmd("wincmd =")
						end
					end,
				},
			},
		})
	end,
}
@asynchroza asynchroza added the bug Something isn't working label May 5, 2024
obukhovaa pushed a commit to obukhovaa/neo-tree.nvim that referenced this issue Sep 18, 2024
@obukhovaa
Copy link
Contributor

@asynchroza I think I've found the root cause of the issue. A useless -not -path options within find command were excluding all the files if your path contains any . folder, e.g. ~/.config/my-project. Created a fix.

@asynchroza
Copy link
Author

Good stuff, @obukhovaa! I just pulled your changes locally and they work. Will surely make life a lot easier.

@FourSeventy
Copy link

I'm having this same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants