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
+19-5
Original file line number
Diff line number
Diff line change
@@ -367,7 +367,7 @@ 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:
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):
371
371
372
372
```lua
373
373
localpersisted=require("persisted")
@@ -379,11 +379,25 @@ persisted.setup({
379
379
vim.api.nvim_create_autocmd("VimEnter", {
380
380
nested=true,
381
381
callback=function()
382
-
-- Add more complex logic here
383
-
ifvim.fn.argc() >0then
384
-
-- Leverage the plugin's ability to resolve allowed_dirs and ignored_dirs
0 commit comments