folding and avante enabled
This commit is contained in:
parent
073c7db9b1
commit
a627ebcfcf
4 changed files with 171 additions and 140 deletions
|
@ -39,19 +39,23 @@ return {
|
|||
return {
|
||||
provider = "copilot",
|
||||
auto_suggestions_provider = "copilot",
|
||||
-- providers = {
|
||||
-- ollama = {
|
||||
-- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end.
|
||||
-- model = "gemma3:12b",
|
||||
-- },
|
||||
-- ollamafast = {
|
||||
-- __inherited_from = "ollama",
|
||||
-- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end.
|
||||
-- model = "gemma3:4b",
|
||||
-- },
|
||||
-- },
|
||||
hints = { enabled = true },
|
||||
providers = {
|
||||
morph = {
|
||||
model = "auto",
|
||||
},
|
||||
-- ollama = {
|
||||
-- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end.
|
||||
-- model = "gemma3:12b",
|
||||
-- },
|
||||
-- ollamafast = {
|
||||
-- __inherited_from = "ollama",
|
||||
-- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end.
|
||||
-- model = "gemma3:4b",
|
||||
-- },
|
||||
},
|
||||
hints = { enabled = false },
|
||||
behavior = {
|
||||
enable_fastapply = true,
|
||||
auto_suggestions = true,
|
||||
auto_set_highlight_group = true,
|
||||
auto_set_keymaps = false,
|
27
lua/tools/folding.lua
Normal file
27
lua/tools/folding.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
||||
vim.opt.foldcolumn = "0"
|
||||
vim.opt.foldtext = ""
|
||||
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.foldlevelstart = 99
|
||||
|
||||
vim.opt.foldnestmax = 3
|
||||
|
||||
vim.keymap.set('n', '<leader>z', function()
|
||||
local any_fold_open = false
|
||||
for lnum = 1, vim.fn.line('$') do
|
||||
if vim.fn.foldclosed(lnum) ~= -1 then
|
||||
any_fold_open = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if any_fold_open then
|
||||
-- There's at least one closed fold, so open all
|
||||
vim.cmd('normal! zR')
|
||||
else
|
||||
-- All folds are open, so close all
|
||||
vim.cmd('normal! zM')
|
||||
end
|
||||
end, { noremap = true, silent = true })
|
Loading…
Add table
Add a link
Reference in a new issue