Gives warning about `number` and `cursorline`
farzadmf opened this issue · comments
Hi,
I'm lazy loading the plugin, but on startup, it shows warnings about cursorline
and number
not being set.
This is my config:
{
'mawkler/modicator.nvim',
event = { 'BufNew', 'BufReadPost' },
init = function()
-- These are required for Modicator to work
vim.o.cursorline = true
vim.o.number = true
vim.o.termguicolors = true
end,
opts = {},
}
Is there something I'm missing from my config?
And the warnings are:
modicator.nvim requires `number` to be set. Run `:set number` or add `vim.o.number = true` to your init.lua
and:
modicator.nvim requires `cursorline` to be set. Run `:set cursorline` or add `vim.o.cursorline = true` to your init.lua
Hi @farzadmf! Are you by any chance using a start-screen plugin like alpha-nvim, or similar? Or is anything else disabling your vim.o.number
or vim.o.cursorline
?
Hey @mawkler , thank you for your reply. I am using mini.starter.
I'm probably wrong, but I thought that since I'm loading modicator
lazily, its init
function should take over, but I guess that's not the case, is it?
Is there anyway I can make modicator
work with mini.starter
?
@farzadmf lazy.nvim's init
are always executed immediately, compared to config
which is executed when the plugin gets (lazy)loaded. You could try and move them to config
like so:
{
'mawkler/modicator.nvim',
config = function()
vim.o.cursorline = true
vim.o.number = true
vim.o.termguicolors = true
end,
opts = {},
}
I get the same warnings with alpha.nvim but for me modicator works as intended, it's just that the warnings aren't aware of start page plugins. I have simply set show_warnings = false
in my config to disable the warnings.
I'll go ahead and close this issue. Please let me know if you have any more questions 🙂
Hi @mawkler, i have this exact same problem under lunarvim nightly and neovim nightly.
my config is
{
'mawkler/modicator.nvim', -- color line number with insert mode
-- dependencies = 'mawkler/onedark.nvim', -- Add your colorscheme plugin here
config = function()
-- These are required for Modicator to work
require('modicator').setup({
highlights = {
-- Default options for bold/italic
defaults = {
bold = true,
}
},
-- show_warnings = false
})
vim.o.cursorline = true
vim.o.number = true
vim.o.termguicolors = true
end,
},
the error is only about vim.o.number.
also, modicator doesn't work at all.
Not really sure how i could go debugging this
@gipo355 Modicator requires cursorline
, number
and termguicolors
to work. Try setting them before you load modicator, like so:
{
'mawkler/modicator.nvim', -- color line number with insert mode
-- dependencies = 'mawkler/onedark.nvim', -- Add your colorscheme plugin here
config = function()
-- These are required for Modicator to work
vim.o.cursorline = true
vim.o.number = true
vim.o.termguicolors = true
require('modicator').setup({
highlights = {
-- Default options for bold/italic
defaults = {
bold = true,
}
},
-- show_warnings = false
})
end,
},
Hey,
receiving same warning:
modicator.nvim requires `number` to be set. Run `:set number` or add `vim.o.number = true` to your init.lua
My setup is like this:
use {
'mawkler/modicator.nvim',
dependencies = "rose-pine",
config = function()
vim.o.cursorline = true
vim.o.number = true
vim.o.termguicolors = true
require('modicator').setup()
end,
opts = {},
}
Any ideas about what I am doing wrong?
@gipo355 Modicator requires
cursorline
,number
andtermguicolors
to work. Try setting them before you load modicator, like so:{ 'mawkler/modicator.nvim', -- color line number with insert mode -- dependencies = 'mawkler/onedark.nvim', -- Add your colorscheme plugin here config = function() -- These are required for Modicator to work vim.o.cursorline = true vim.o.number = true vim.o.termguicolors = true require('modicator').setup({ highlights = { -- Default options for bold/italic defaults = { bold = true, } }, -- show_warnings = false }) end, },
Hi @mawkler, sorry for the late reply.
Just tried your suggestion and I'm still receiving the same problem
@sebastianstupak @gipo355 The message is just a heads-up to new users. It's fired on the VimEnter
autocommand. There may be some other plugin that changes the settings for cursorline
/number
/termguicolors
in between your Modicator config being set and VimEnter
being triggered. If Modicator is otherwise working, you can simply disable the warnings by settings show_warnings = false
. If Modicator is not working, please post a full minimal config that reproduces the issue here 🙂