Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating sign segment #149

Open
GusChenn opened this issue Dec 3, 2024 · 1 comment
Open

Error when creating sign segment #149

GusChenn opened this issue Dec 3, 2024 · 1 comment

Comments

@GusChenn
Copy link

GusChenn commented Dec 3, 2024

I was trying to setup this plugin with gitsigns, but i noticed that whenever i try to create a sign segment i get the following error:

.../.local/share/nvim/lazy/statuscol.nvim/lua/statuscol.lua:262: in function <.../.local/share/nvim/lazy/statuscol.nvim/lua/statuscol.lua:234>                                                                                    
E15: Invalid expression: "v:lua.require('statuscol').get_statuscol_string()"

The plugins works fine when there are no sign segments though

Here is a minimal config to reproduce this:

-- nvim/init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
	local lazyrepo = "https://github.com/folke/lazy.nvim.git"
	vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
end

vim.opt.rtp:prepend(lazypath)

vim.g.mapleader = " "
vim.g.maplocalleader = "\\"

require("lazy").setup({
	spec = {
		{
			"ewis6991/gitsigns.nvim",
			lazy = false,
			config = function()
				require("gitsigns").setup()
			end,
		},
		{
			"luukvbaal/statuscol.nvim",
			lazy = false,
			dependencies = {
				"ewis6991/gitsigns.nvim",
			},
			config = function()
				require("statuscol").setup({
					setopt = true,
					relculright = true,
					segments = {
						{
							sign = { namespace = { "gitsign" } },
						},
					},
				})
			end,
		},
	},
})

And here are some infos about my nvim

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713484068

// On MacOS

I tried debuging it, but couldnt figure out whats going on.

Thanks for the plugin btw, it really makes setting up a custom statuscolumn much simpler!

@luukvbaal
Copy link
Owner

Thanks for the kind words and sorry for the late response. I'm not sure what could cause this error and I'm not able to reproduce this issue. Were you able to fix this or can you provide more information?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants