mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim: moved stuff around.
This commit is contained in:
parent
300d300664
commit
0d7a5fab7b
22 changed files with 975 additions and 990 deletions
58
nvim/lua/user/plugins/ui/statuscolumn.lua
Normal file
58
nvim/lua/user/plugins/ui/statuscolumn.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
local icons = require('user.icons')
|
||||
|
||||
local opts = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
return {
|
||||
-- Align current relative number to the right.
|
||||
relculright = true,
|
||||
ft_ignore = {
|
||||
'help',
|
||||
'alpha'
|
||||
},
|
||||
segments = {
|
||||
{
|
||||
click = "v:lua.ScSa",
|
||||
sign = {
|
||||
namespace = { "gitsigns" },
|
||||
maxwidth = 1,
|
||||
colwidth = 1,
|
||||
foldclosed = true,
|
||||
}
|
||||
},
|
||||
{
|
||||
click = "v:lua.ScSa",
|
||||
sign = {
|
||||
name = { ".*" },
|
||||
namespace = { ".*" },
|
||||
maxwidth = 1,
|
||||
foldclosed = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
text = { " ", builtin.lnumfunc, " " },
|
||||
click = "v:lua.ScLa",
|
||||
},
|
||||
{
|
||||
text = { builtin.foldfunc, " " },
|
||||
condition = { true, function (args) return args.fold.width > 0 end },
|
||||
click = "v:lua.ScFa"
|
||||
},
|
||||
{
|
||||
text = {
|
||||
function(args)
|
||||
local pos = vim.api.nvim_win_get_cursor(args.win)
|
||||
return (args.lnum == pos[1] and "%#SignColumnSep#" or "")..icons.signcolum.separator
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- Better status column
|
||||
return {
|
||||
"luukvbaal/statuscol.nvim",
|
||||
event = { "BufReadPre", "BufNewFile", "BufAdd" },
|
||||
opts = opts
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue