add new plugins
This commit is contained in:
parent
d6ad2d0ef7
commit
4bce08bc22
13 changed files with 479 additions and 322 deletions
36
lua/custom/plugins/nvim-ufo.lua
Normal file
36
lua/custom/plugins/nvim-ufo.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
event = "BufEnter",
|
||||
config = function()
|
||||
-- Fold options
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
require("ufo").setup()
|
||||
end,
|
||||
opts = {
|
||||
preview = {
|
||||
win_config = {
|
||||
border = { "", "─", "", "", "", "─", "", "" },
|
||||
winhighlight = "Normal:Folded",
|
||||
winblend = 0,
|
||||
},
|
||||
mappings = {
|
||||
scrollB = "<C-b>",
|
||||
scrollF = "<C-f>",
|
||||
scrollU = "<C-u>",
|
||||
scrollD = "<C-d>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
provider_selector = function(_, filetype, buftype)
|
||||
return (filetype == "" or buftype == "nofile") and "indent" -- only use indent until a file is opened
|
||||
or { "treesitter", "indent" } -- if file opened, try to use treesitter if available
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue