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

[harpoon2] Select shows absolute path instead of relative path #610

Open
juru1234 opened this issue Jun 22, 2024 · 1 comment
Open

[harpoon2] Select shows absolute path instead of relative path #610

juru1234 opened this issue Jun 22, 2024 · 1 comment

Comments

@juru1234
Copy link

Hi,

I'm using harpoon2. When I start neovim and directly jump to the following buffers using:

vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end)

my statusline always shows an absolute path for the second one instead of a relative one.

If I start neovim and cycle through my buffers using

vim.keymap.set("n", "hn", function() harpoon:list():next() end)

all files are shown correctly with their relative paths. Now I can also use select and the relative paths are still shown correctly.

@juru1234
Copy link
Author

Ok, I found out this doesn't happen when using lualine with relative paths enabled. Only when defining my own statusline with

local statusline = {
	' %f',
	'%r',
	'%m',
	'%=',
	'%{&filetype}',
	' %2p%%',
	' %3l:%-2c '
}
vim.o.statusline = table.concat(statusline, '')

Seems to be a problem with the %f

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

No branches or pull requests

1 participant