How to disable number and relativenumber for mini.starter #1754
-
Contributing guidelines
Module(s)mini.starter Questionhi, recently I enabled vim.api.nvim_create_autocmd("User", {
pattern = "MiniStarterOpened",
callback = function()
if vim.bo.filetype == "ministarter" then
local winid = vim.cpi.nvim_get_current_win()
vim.wo[winid].number = false
vim.wo[winid].relativenumber = false
end
end,
}) I also searched in the community, but didn't find a good solution. Does anybody have similar experience? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Both 'number' and 'relativenumber' are disabled in 'mini.starter' buffers. The reason for those still showing almost surely lies outside of 'mini.starter'. In particular, there is There are several ways to adjust this:
|
Beta Was this translation helpful? Give feedback.
Both 'number' and 'relativenumber' are disabled in 'mini.starter' buffers. The reason for those still showing almost surely lies outside of 'mini.starter'.
In particular, there is
vim.opt.relativenumber = true
, which gets executedlater
. This means that it sets relative number in current window also.There are several ways to adjust this:
vim.go.relativenumber = true
to explicitly set global value of this option. This won't affect currently opened window-buffers combinations, but should be used for future ones.now
and notlater
), possibly even as one of the first things.