fix: better fold

This commit is contained in:
alzalia1 2025-08-17 17:42:12 +02:00
parent 67df812bec
commit 640176cad2
7 changed files with 45 additions and 47 deletions

View file

@ -27,11 +27,12 @@
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-jdtls": { "branch": "master", "commit": "4d77ff02063cf88963d5cf10683ab1fd15d072de" },
"nvim-lspconfig": { "branch": "master", "commit": "b0caeef0d835fbe19df6ad71dbc4345eaaea649c" },
"nvim-origami": { "branch": "main", "commit": "7601195576615ba209d79f3dccc764f82d802b5c" },
"nvim-tree.lua": { "branch": "master", "commit": "f0e9951778802526b14c934f7bf746e1e0ae5ed0" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ufo": { "branch": "main", "commit": "d31e2a9fd572a25a4d5011776677223a8ccb7e35" },
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"ui": { "branch": "v3.0", "commit": "af4407decaf6528cb21a7b0fd8925664c8e573c0" },

View file

@ -13,6 +13,12 @@ local options = {
timeout_ms = 500,
lsp_fallback = true,
},
formatters = {
prettier = {
append_args = { "--tab-width", "4" },
},
},
}
return options

View file

@ -1,10 +0,0 @@
local highlight = {
"CatppuccinRed",
"CatppuccinPeach",
"CatppuccinYellow",
"CatppuccinGreen",
"CatppuccinBlue",
"CatppuccinPurple",
}
return highlight

View file

@ -1,13 +0,0 @@
return {
"chrisgrieser/nvim-origami",
event = "VeryLazy",
opts = {
foldKeymaps = { setup = false },
}, -- needed even when using default config
-- recommended: disable vim's auto-folding
init = function()
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
end,
}

View file

@ -0,0 +1,20 @@
return {
"kevinhwang91/nvim-ufo",
event = "BufReadPost",
dependencies = {
"kevinhwang91/promise-async",
"nvim-treesitter/nvim-treesitter",
},
init = function()
vim.o.foldenable = true
vim.o.foldcolumn = "auto:9"
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.fillchars = "eob: ,fold: ,foldopen:,foldsep:│,foldclose:"
end,
opts = {
provider_selector = function()
return { "treesitter", "indent" }
end,
},
}

View file

@ -20,11 +20,3 @@ end)
map("t", "<C-t>", function()
term.toggle()
end)
-- folds
map("n", "<Left>", function()
require("origami").h()
end)
map("n", "<Right>", function()
require("origami").l()
end)

View file

@ -4,3 +4,5 @@ require "nvchad.options"
local o = vim.o
o.shiftwidth = 4
o.tabstop = 4
-- vim.wo.number = true