forked from dam9000/kickstart-modular.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add luukvbaal/statuscol.nvim to allow for more statuscol layers
taken from nvim-lua#1196
- Loading branch information
1 parent
855aa3e
commit 3dfd2c7
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- Provide a configurable 'statuscolumn' and click handlers | ||
return { | ||
'luukvbaal/statuscol.nvim', | ||
config = function() | ||
vim.opt.fillchars = vim.g.have_nerd_font and { foldclose = '', foldopen = '', foldsep = ' ' } or { foldclose = '˃', foldopen = '˅', foldsep = ' ' } | ||
vim.opt.foldcolumn = '1' | ||
|
||
local builtin = require 'statuscol.builtin' | ||
require('statuscol').setup { | ||
-- configuration goes here, for example: | ||
relculright = true, -- whether to right-align the cursor line number with 'relativenumber' set | ||
segments = { | ||
{ | ||
sign = { namespace = { 'diagnostic/signs' } }, | ||
click = 'v:lua.ScSa', | ||
}, | ||
{ | ||
sign = { name = { '.*' }, colwidth = 1 }, -- signs like breakpoints, etc. | ||
click = 'v:lua.ScSa', | ||
}, | ||
{ text = { builtin.lnumfunc }, click = 'v:lua.ScLa' }, -- line number that can be configured through a few options | ||
{ | ||
sign = { namespace = { 'gitsigns' }, colwidth = 1 }, | ||
click = 'v:lua.ScSa', | ||
}, | ||
{ text = { builtin.foldfunc }, click = 'v:lua.ScFa' }, -- fold column that does not print the fold depth digits | ||
{ text = { ' ' } }, -- whitespace padding | ||
}, | ||
} | ||
end, | ||
} |