Show normal line numbers in insert mode
This commit is contained in:
parent
a71534ee68
commit
e002342c7f
@ -16,16 +16,29 @@ spec.config = function()
|
||||
foldclose = "",
|
||||
})
|
||||
|
||||
local function line_numbers(args, fa)
|
||||
if vim.api.nvim_get_mode().mode == "n" then
|
||||
return builtin.lnumfunc(args, fa)
|
||||
else
|
||||
return "%l"
|
||||
end
|
||||
end
|
||||
|
||||
local signs = {
|
||||
text = { "%s" },
|
||||
}
|
||||
local folds = {
|
||||
text = { builtin.foldfunc, " " },
|
||||
condition = { builtin.not_empty },
|
||||
}
|
||||
local numbers = {
|
||||
text = { line_numbers, " " },
|
||||
condition = { true, builtin.not_empty },
|
||||
}
|
||||
|
||||
statuscol.setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { "%s" }},
|
||||
{
|
||||
text = { builtin.lnumfunc, " " },
|
||||
condition = { true, builtin.not_empty },
|
||||
},
|
||||
{ text = { builtin.foldfunc, " " }},
|
||||
}
|
||||
segments = { signs, folds, numbers }
|
||||
})
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user