Skip to content
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

short_file_names cannot hide all path #32

Open
Jaehaks opened this issue May 3, 2024 · 9 comments
Open

short_file_names cannot hide all path #32

Jaehaks opened this issue May 3, 2024 · 9 comments
Assignees

Comments

@Jaehaks
Copy link

Jaehaks commented May 3, 2024

Thank you for you effort.
I'm windows 10 user with nvim-qt.

I installed this plugin and set short_file_names = true to show only filename + extension.
But the behavior is the same with short_file_names = false.
All lists show their path. If files are in subdirectory of current path, relative path is shown.
If files are in parent directory of current path, absolute path is shown.
Is It normal?

image

this is my configuraiton

bm.setup({
  select_menu_item_commands = {
    edit = {
      key = '<CR>',
      command = 'edit'
    },
    v = {
      key = '<C-v>',
      command = 'vsplit'
    },
    h = {
      key = '<C-h>',
      command = 'split'
    },
  },
  short_file_names = true, -- show shorten filename
  short_term_names = true,
  loop_nav = true,
})

one more question.,.
The vsplit / split mapping doesn't work. works as visual block only

@j-morano j-morano added bug Something isn't working windows-bug and removed bug Something isn't working labels May 5, 2024
@j-morano
Copy link
Owner

j-morano commented May 5, 2024

Hello. Thanks for the feedback. This feature does not work on Windows yet. As for the vsplit/split mappings, you should not have any problems. Maybe those mappings are overridden somewhere in normal mode.

@Jaehaks
Copy link
Author

Jaehaks commented May 15, 2024

@j-morano
I see. I think the reason is that buffer_manager.nvim deals path wiht '/' as delimiter only.

@Jaehaks
Copy link
Author

Jaehaks commented May 15, 2024

@j-morano
I thought that this problem is caused by windows path delimiter.

I checked the M.toggle_quick_menu() and found that config.short_file_names is always false although I set this option in configuration.

@bdemirtas
Copy link

I'm having the same issue in Fedora. Short_file_names doesn't work, shows me the full path.

@j-morano
Copy link
Owner

I'm having the same issue in Fedora. Short_file_names doesn't work, shows me the full path.

I am using Fedora, and it is working. Can you provide more details? So I can try to reproduce it.

@j-morano
Copy link
Owner

j-morano commented May 22, 2024

I created the branch windows-separator and added a commit to try to solve this issue. Can you give it a try to check if the problem perists?

@j-morano j-morano self-assigned this May 22, 2024
@bdemirtas
Copy link

I'm having the same issue in Fedora. Short_file_names doesn't work, shows me the full path.

I am using Fedora, and it is working. Can you provide more details? So I can try to reproduce it.

When I have multiple nested folders, it become very long and continue on the second line.
My config it's pretty much what's in the README.md.

config

{
		"j-morano/buffer_manager.nvim",
		dependencies = "nvim-lua/plenary.nvim",
		lazy = false,
		keys = {
			{ "<leader>db", ":Bdelete<CR>", desc = "Delete Buffer" },
		},
		config = function()
			require("buffer_manager").setup({
				vim.keymap.set(
					{ "t", "n" },
					"<leader>fb",
					require("buffer_manager.ui").toggle_quick_menu,
					{ noremap = true, desc = "Buffers List" }
				),

				select_menu_item_commands = {
					v = {
						key = "<C-v>",
						command = "vsplit",
					},
					h = {
						key = "<C-h>",
						command = "split",
					},
				},
				focus_alternate_buffer = false,
				short_file_names = true,
        order_buffers = "filename",
				loop_nav = true,
				highlight = "Normal:BufferManagerBorder",
				win_extra_options = {
					winhighlight = "Normal:BufferManagerNormal",
				},
			})
		end,
	},

Screenshot from 2024-05-24 05-51-39

@Jaehaks
Copy link
Author

Jaehaks commented May 25, 2024

I created the branch windows-separator and added a commit to try to solve this issue. Can you give it a try to check if the problem perists?

@j-morano I tested the commit 2b0e03e of branch 'windows-separator'

It does not work like I thoght it would.
This is result of the commit. it still does not apply the configuraiton.
It shows backslash at first region of path. but change to slash after USER directory
image

It is the result of adding get_config() in toggle_quick_menu()
It recognize the short_file_names feature. but cannot change to short name entirely.
image

@j-morano
Copy link
Owner

j-morano commented May 31, 2024

Thank you for your effort. I do not have access to a Windows machine, so I welcome any help to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants