Giter VIP home page Giter VIP logo

Comments (12)

adoyle-h avatar adoyle-h commented on July 21, 2024 1

Emmm.... I raised it too. 😅

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

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.

olimorris avatar olimorris commented on July 21, 2024

Can you reproduce this with a minimal.lua file? I've just tried with my config and I can't reproduce it:

Screen Shot 2023-02-26 at 21 29 41

from persisted.nvim.

adoyle-h avatar adoyle-h commented on July 21, 2024

@olimorris

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.

olimorris avatar olimorris commented on July 21, 2024

@tmpm697 can you raise a new issue. This is not related to this

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

@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:

Screen Shot 2023-02-27 at 22 56 18

Can you try with my config above?

from persisted.nvim.

adoyle-h avatar adoyle-h commented on July 21, 2024

@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.

1

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

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

Screen Shot 2023-02-28 at 08 31 41

Sourcing the session

Screen Shot 2023-02-28 at 08 34 10

Can you test the same and then I propose one of us raises an issue in Neovim core.

from persisted.nvim.

adoyle-h avatar adoyle-h commented on July 21, 2024

Yes. I reproduce it with your codes. Thank you so much. @olimorris

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

@adoyle-h I've now raised this neovim/neovim#22450

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

Haha damn. Who's written the cleaner issue? 🤣🤣🤣

from persisted.nvim.

adoyle-h avatar adoyle-h commented on July 21, 2024

I think mine is better. I test it with { 'options', 'localoptions' }, and get the same issue.

from persisted.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.