Commit Graph

11 Commits (ff30e8b4cc80593e5101de3dcf2896646487b1f9)

Author SHA1 Message Date
olimorris ff30e8b4cc fix: vim.fn.has('win32') returns 0 or 1, not a boolean 2021-10-24 19:55:22 +01:00
Oli M 082a52e999
Merge branch 'main' into main 2021-10-22 14:14:04 +01:00
3rdey3 83af96b1f2
fix: properly escape session file names on Windows (#7) 2021-10-22 13:25:52 +02:00
olimorris 76a994c185 Fix: use_git_branch in a non git repo caused error
Using `use_git_branch` in a non git enabled repo caused an error. This has been addressed by checking for the presence of a `.git` folder in the cwd. If no branch has been specified then we default to HEAD via the addition of `2>/dev/null` in our shell command
2021-09-08 17:01:06 +01:00
olimorris 2d6a222073 Add additional 'using_persistence' global vars
In further testing, it became clear that adding the global variables to the setup and start functions would be useful.

It also seemed to make sense to return boolean values to detect if Persistence has stopped (false) or is in active use (true).
2021-09-07 22:31:12 +01:00
olimorris f4e7632db2 Correct typos 2021-09-07 19:57:22 +01:00
olimorris e70b5e2fc8 Add ability to determine if persistence.nvim is running
In my statusline, I like to know if persistence.nvim is active. I have a simple helper function:

function using_session()
  return (vim.g.using_persistance ~= nil)
end

which I reference and display a corresponding glyph
2021-09-07 19:38:33 +01:00
olimorris 3d84264be5 Add ability to session based on cwd and git branch
This creates session files like:

%Users%Oli%Code%Projects%persistance_feature%add-git-branch-to-session

enabling you to segment your project directory by git branch
2021-09-07 19:37:26 +01:00
Folke Lemaitre a39f3f10c8
feat: added config options 2021-07-12 10:47:09 +02:00
Folke Lemaitre 38203a17a9 fix: renamed session to persistence in autocmds 2021-07-03 23:53:52 +02:00
Folke Lemaitre 8b32094309
feat: inital version 2021-07-02 08:55:37 +02:00