Comments (12)
Emmm.... I raised it too. 😅
from persisted.nvim.
Thank you for raising. Will look into this during the week. I'll be surprised if this is plugin related as we're mostly using core Vim functionality at load.
from persisted.nvim.
Can you reproduce this with a minimal.lua
file? I've just tried with my config and I can't reproduce it:
from persisted.nvim.
Notice: When a session saved two or more buffers, cmdheight will be set to 1. If a session saved only 1 buffer, the cmdheight is still be 2.
You should save session with 2 buffers (vsplit
or split
) to reproduce this issue.
The minimal.lua file.
vim.opt.sessionoptions = { 'curdir', 'folds', 'tabpages', 'winpos' }
vim.opt.cmdheight = 2
vim.opt.rtp:prepend('~/.local/share/nvim/plugins/persisted.nvim/')
require('persisted').setup {}
Open neovim with nvim -u ./minimal.lua
.
from persisted.nvim.
@tmpm697 can you raise a new issue. This is not related to this
from persisted.nvim.
@adoyle-h. Struggling to reproduce this now, I've just tried with the following config and two buffers written into a session.
local root = "/tmp/persisted"
-- Set stdpaths to use root dir
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- Bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
vim.opt.sessionoptions = { 'curdir', 'folds', 'tabpages', 'winpos' }
vim.opt.cmdheight = 2
-- Install plugins
local plugins = {
{
"olimorris/persisted.nvim",
config = true
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
Screenshot below:
Can you try with my config above?
from persisted.nvim.
@olimorris You should use :vs
or :sp
to open two buffers in same screen to reproduce this issue.
You don't need plugin manager to install plugin. Just use git clone <dir>
to download plugin. And add the <dir>
to vim.opt.rtp
.
vim.opt.sessionoptions = { 'curdir', 'folds', 'tabpages', 'winpos' }
vim.opt.cmdheight = 2
vim.opt.rtp:prepend('~/.local/share/nvim/plugins/persisted.nvim/') -- git clone directory
require('persisted').setup {}
This my record.
from persisted.nvim.
Okay sorry. Long day yesterday. So I can recreate this bug without persisted and using native vim commands:
vim.opt.sessionoptions = { 'curdir', 'folds', 'tabpages', 'winpos' }
vim.opt.cmdheight = 2
Creating the session
Sourcing the session
Can you test the same and then I propose one of us raises an issue in Neovim core.
from persisted.nvim.
Yes. I reproduce it with your codes. Thank you so much. @olimorris
from persisted.nvim.
@adoyle-h I've now raised this neovim/neovim#22450
from persisted.nvim.
Haha damn. Who's written the cleaner issue? 🤣🤣🤣
from persisted.nvim.
I think mine is better. I test it with { 'options', 'localoptions' }
, and get the same issue.
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
- [Bug]: Autoload not working HOT 3
- [Bug]: SessionLoad crashes HOT 12
- [Bug]: no-neck-pain.nvim `disable` doesn't work in `SavePre` hook HOT 9
- [Feature] Allow loading a session by name HOT 4
- Replace callbacks with user events HOT 30
- Startup time increased dramatically HOT 3
- [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.