Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally add statuscol.nvim #1196

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@ require('lazy').setup({
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.statuscol',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
Expand Down
31 changes: 31 additions & 0 deletions lua/kickstart/plugins/statuscol.lua
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,
}
Loading