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

[Bug]: loose bufferline bar if switch session that not current in a session? #655

Closed
1 task done
tmpm697 opened this issue Jan 12, 2023 · 2 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@tmpm697
Copy link

tmpm697 commented Jan 12, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

more in here: rmagatti/auto-session#196 (comment)
and: rmagatti/auto-session#197

tools:

https://github.com/nvim-telescope/telescope-project.nvim
https://github.com/rmagatti/auto-session
bufferline.nvim and neovim 0.8.2/nighly
I got this issue, step (clean up/remove all saved session files from cache):

1. use :Telescope project to create project/session A and B (with different directory)
2. cd "$(mktemp -d)"
3. nvim
4. :Telescope project and then ctrl-l to switch session A, and then open some buffers
5. same as 4 but with B
6. switch back and forth between A and B --> perfect, bufferline.nvim show its bar and buffers's name/title
7. exit nvim
8. nvim
9. select project A and B back and forth 
10. observe that there're no bufferline's bar exist --> bufferline completely not appear

why and how bufferline disappear when restore session and its' not happen in first session when create them. @rmagatti 

after 10 if i go to A project's folder and then start nvim, bufferline shows as usual.

sum up:

  1. if first open nvim and create projects and switch between them, you don't need to under a session, still work perfect switching
  2. after projects created, you NEED to under a session/project to have bufferline bar appear between switching, if not you'll loose bufferline bar.

What did you expect to happen?

I can cd /path/of/whatever and then start nvim and can switch back and forth session/projects with nvim, telescope-project and auto-save plugin enabled.

Config

-- i'm using lazy.nvim to load bufferline.nvim
return {
"akinsho/bufferline.nvim",
event = "BufReadPre",

config = function()
	require("bufferline").setup({
		options = {
			show_close_icon = false,
			diagnostics = "nvim_lsp",
			-- always_show_bufferline = false,
			separator_style = "thick",
			offsets = {
				{
					filetype = "neo-tree",
					text = "Neo Tree",
					-- highlight = "Directory",
					text_align = "left",
				},
			},
		},
	})
end,

}

Additional Information

...

commit

No response

@tmpm697 tmpm697 added the bug Something isn't working label Jan 12, 2023
@tmpm697
Copy link
Author

tmpm697 commented Jan 12, 2023

I also tried above with vim.o.sessionoptions = "globals" as suggested in #649, same result, still need to cd to one of session/project's folder.

@tmpm697
Copy link
Author

tmpm697 commented Jan 12, 2023

I've switched to https://github.com/noib3/nvim-cokeline and don't see this issue, feel free to close.

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

2 participants