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

Setup error #16

Closed
simonmandlik opened this issue Jan 14, 2024 · 1 comment
Closed

Setup error #16

simonmandlik opened this issue Jan 14, 2024 · 1 comment

Comments

@simonmandlik
Copy link

I get the following error, when scope and modes are setup, and theme is changed programatically afterwards:

Error detected while processing ./minimal.lua:
E5113: Error while calling lua chunk: ./minimal.lua:28: /Users/simon.mandlik/Downloads/test_deadcolumn/minimal.lua..ColorScheme Autocommands for "*": Vim(append):Erro
r executing lua callback: ...column/.repro/plugins/deadcolumn.nvim/lua/deadcolumn.lua:154: bad argument #1 to 'scope' (number expected, got no value)
stack traceback:
        [C]: in function 'scope'
        ...column/.repro/plugins/deadcolumn.nvim/lua/deadcolumn.lua:154: in function <...column/.repro/plugins/deadcolumn.nvim/lua/deadcolumn.lua:140>
        [C]: in function 'nvim_command'
        ./minimal.lua:28: in main chunk
stack traceback:
        [C]: in function 'nvim_command'
        ./minimal.lua:28: in main chunk

minimal.lua:

local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

local plugins = {
    "Bekaboo/deadcolumn.nvim",
    opts = {
        scope = "buffer",
        modes = function(mode)
            return mode:find('^[nictRss\x13]') ~= nil
        end,
    }
}

vim.cmd[[set termguicolors]]
vim.cmd[[set colorcolumn=20]]

require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.api.nvim_command("colorscheme default")
Bekaboo pushed a commit that referenced this issue Jan 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Bekaboo
Copy link
Owner

Bekaboo commented Jan 15, 2024

Should be fixed.

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