You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-20
Original file line number
Diff line number
Diff line change
@@ -367,15 +367,21 @@ The plugin also comes with pre-defined highlight groups for the Telescope implem
367
367
368
368
The plugin has been designed to be fully extensible. All of the functions in the [init.lua](https://github.com/olimorris/persisted.nvim/blob/main/lua/persisted/init.lua) and [utils.lua](https://github.com/olimorris/persisted.nvim/blob/main/lua/persisted/utils.lua) file are public.
369
369
370
-
Consider a user who wishes to autoload a session if arguments are passed to Neovim. A custom autocmd can be created which forces the autoload (thanks to [neandrake](https://github.com/neandrake) for this solution):
370
+
**Custom Autoloading** by [neandrake](https://github.com/neandrake)
371
371
372
-
```lua
373
-
localpersisted=require("persisted")
372
+
Autoloading a session if arguments are passed to Neovim:
Or, a user who wishes to check whether the current branch is in a table of branches to be ignored:
411
+
**Git Branching from directories that are not the CWD** by [mrloop](https://github.com/mrloop)
412
+
413
+
As per [#149](https://github.com/olimorris/persisted.nvim/discussions/149), if you invoke Neovim from a sub-directory then the git branch will not be detected. The code below amends for this:
0 commit comments