Failing to Detect Git Branch Correctly
bnwa opened this issue · 3 comments
bnwa commented
I installed persisted.nvim
on my experimental dotfiles branch but the plugin still assigns the default branch name (main
) to the session entry instead of the name of the branch.
The config is more or less a duplicate of what's in the README:
use { 'olimorris/persisted.nvim',
config = function ()
require('persisted').setup {}
require('telescope').load_extension 'persisted'
end
}
olimorris commented
Hey and thanks for raising an issue. It looks like you don't have git branching enabled and hence aren't seeing this reflected.
use_git_branch = true
The plugin appends main
to every session unless git tells it otherwise.
bnwa commented
LMAO I must've misread the flag as default true, thanks for pointing it out
olimorris commented
No problem 😉. There's a very good case for it being on by default tbh!