Setup error
simonmandlik opened this issue · 1 comments
simonmandlik commented
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 commented
Should be fixed.