Code Monkey home page Code Monkey logo

Comments (4)

gennaro-tedesco avatar gennaro-tedesco commented on June 17, 2024

Are you sure you want to use two session plugins at the same time, namely folke/persistence.nvim and nvim-possession? They may have some conflicting behaviour, we would need to look into the code of the former to understand if it interacts with lualine even if not prompted.

I noticed that in your configuration you have lualine twice? This said, I have tried to reproduce it on my side by loading folke/persistence.nvim as well on top of mine, and I don't see such behaviour of duplicated lualine. I presume this is due to your statusline configurations (also, you're using tabs, does it also happen if loading buffers only normally? I don't exactly know how lualine interacts with tabs, perhaps it duplicates per window?)

from nvim-possession.

phootip avatar phootip commented on June 17, 2024

For the first question, no, I do not want to use persistence.nvim together with nvim-possession, so I specify enabled = false for persistence.nvim. You can pay no mind to it, it's a lazyvim thing (ref),

For second question, that file is an example and do not contribute anything to my nvim because there is a return {} on line 3.
this file also a part of lazyvim starter repo.

Basically I'm was reproducing this with as least commit as possible branching from lazyvim starter repo

Thank you for answering, another thing is that this double lualine go away after resizing the terminal, I tested it with window terminal and iterm2, but do not go away if I use :redraw, :redrawtabline.

from nvim-possession.

gennaro-tedesco avatar gennaro-tedesco commented on June 17, 2024

Let us try to test it with a minimal configuration: please use the below template as repro.lua and then execute nvim -u repro.lua:

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
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)

-- install plugins
local plugins = {
	{ "craftzdog/solarized-osaka.nvim" },
	{
		"gennaro-tedesco/nvim-possession",
		dependencies = {
			"ibhagwan/fzf-lua",
		},
		config = true,
		init = function()
			local possession = require("nvim-possession")
			vim.keymap.set("n", "<leader>sl", function()
				possession.list()
			end)
			vim.keymap.set("n", "<leader>sn", function()
				possession.new()
			end)
			vim.keymap.set("n", "<leader>su", function()
				possession.update()
			end)
			vim.keymap.set("n", "<leader>sd", function()
				possession.delete()
			end)
		end,
	},
	{ "nvim-lualine/lualine.nvim", config = true },
	-- add any other puglins down here
}
vim.g.mapleader = " "
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.opt.termguicolors = true
vim.cmd([[colorscheme solarized-osaka]])

where you can slightly modify the above to adapt it to your configuration options (in particular for lualine). Modularly add some configuration until you reach the problem and then we can see what is causing it.

from nvim-possession.

phootip avatar phootip commented on June 17, 2024

Right now I manage to fix this with

vim.api.nvim_create_autocmd("TabEnter", { command = "set cmdheight=1" })

I might try to comeback and reproduce this with minimal config later, thank you for your time

from nvim-possession.

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.