Comments (4)
This is undocumented but there is an API available with require("persisted").list()
. It should throw out a table like:
{
{
branch = "main",
dir_path = ".dotfiles",
file_path = "/Users/Oli/.local/share/nvim/sessions/%Users%Oli%.dotfiles@@main.vim",
name = ".dotfiles@@main"
},
{
branch = "main",
dir_path = "Code/Java/hello_world",
file_path = "/Users/Oli/.local/share/nvim/sessions/%Users%Oli%Code%Java%hello_world@@main.vim",
name = "Code/Java/hello_world@@main"
},
{
branch = "main",
dir_path = "Code/Java/java-sample-app",
file_path = "/Users/Oli/.local/share/nvim/sessions/%Users%Oli%Code%Java%java-sample-app@@main.vim",
name = "Code/Java/java-sample-app@@main"
},
}
where @@
is the branch separator in my case.
from persisted.nvim.
Ah I had discovered that API but didn't realise that I could use the file path with the require('persisted.utils').load(filepath)
to load the session right?
from persisted.nvim.
Good point, I can add a method to load a specific session!
from persisted.nvim.
Closed by #48
from persisted.nvim.
Related Issues (20)
- [Bug]: Getting "Could not find a session for" error on any new git repo or branch I open HOT 3
- Howto ignore dirs "~" but not "~/*"? HOT 2
- Error when loading session HOT 3
- [Bug] flash of previous buffer session is autorestored HOT 2
- Replace callbacks with user events HOT 30
- Startup time increased dramatically HOT 3
- [Bug] The cmdheight reset to 1 after SessionLoad HOT 12
- [Bug]: Unable to turn off autosaving HOT 6
- `string.gsub(session, save_dir, "")` will fail if special characters are not escaped HOT 3
- [Bug]: sessions dir is empty and nothing opened when :SessionLoad HOT 3
- `autosave` should not fires when opening single file in any directory HOT 3
- [Bug]: SessionSave / SessionLoad not working HOT 8
- [Bug]: Session overwrite when switch via telescope? HOT 15
- [Bug]: Handle interaction with lazy.nvim HOT 1
- [Bug]: howto pin a buffer through sessions switching? HOT 1
- [Bug]: uv_close: Assertion `!uv__is_closing(handle' failed HOT 10
- [Bug]: Telescope extension doesn't work after neovim update HOT 4
- [Bug]: Autosave Not Triggered Without Existing Session File HOT 8
- [Bug]: Still running git commands when `use_git_branch=false` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from persisted.nvim.