feat: add plugin statuscolumn and nvim-ufo

This commit is contained in:
Sven Vogel 2024-11-20 18:44:38 +01:00
parent 0ee6fb54cd
commit 2fabd1255f
3 changed files with 108 additions and 0 deletions

View File

@ -31,6 +31,27 @@ opt.wrap = false
opt.smoothscroll = true opt.smoothscroll = true
opt.swapfile = false -- disable swapfiles because they are fucking garbage opt.swapfile = false -- disable swapfiles because they are fucking garbage
opt.smartindent = true opt.smartindent = true
opt.confirm = true
opt.number = true
opt.foldcolumn = "1"
opt.foldlevel = 99
opt.foldlevelstart = 99
opt.foldenable = true
opt.fillchars = {
foldopen = "",
foldclose = "",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
horiz = "",
horizup = "",
horizdown = "",
vert = "",
vertleft = "",
vertright = "",
verthoriz = "",
}
-- --
-- VIM global options -- VIM global options

29
lua/plugins/nvim-ufo.lua Normal file
View File

@ -0,0 +1,29 @@
--
-- High performance and modern folds.
--
-- Source: https://github.com/kevinhwang91/nvim-ufo
-- ..............................................
--
-- Author: Sven Vogel
-- Created: 20.11.2024
-- Edited: 20.11.2024
--
-- ==============================================
return {
{
"kevinhwang91/nvim-ufo",
event = {
"LspAttach",
},
dependencies = {
"kevinhwang91/promise-async",
},
opts = {
-- register treesitter as source for scopes
provider_selector = function(_, _, _)
return { "treesitter", "indent" }
end
}
}
}

58
lua/plugins/statuscol.lua Normal file
View File

@ -0,0 +1,58 @@
--
-- Status column with click handlers
--
-- Source: https://github.com/luukvbaal/statuscol.nvim
-- ..............................................
--
-- Author: Sven Vogel
-- Created: 07.11.2024
-- Edited: 07.11.2024
--
-- ==============================================
return {
{
'luukvbaal/statuscol.nvim',
lazy = true,
event = {
"BufEnter",
"LspAttach"
},
config = function()
local builtin = require("statuscol.builtin")
require("statuscol").setup({
setopt = true,
ft_ignore = {
"neo-tree"
},
segments = {
-- diagnostic signs
{
sign = {
name = { "Diagnostic" },
colwidth = 2,
maxwidth = 1,
condition = { true }
},
click = "v:lua.ScSa"
},
-- line numbers
{
text = { builtin.lnumfunc, " " },
click = "v:lua.ScLa",
},
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa"
},
-- git signs
{
sign = { namespace = { "gitsigns" } },
click = "v:lua.ScSa"
}
}
})
end
}
}