add folds

This commit is contained in:
Adam Jeniski 2025-10-07 16:04:02 -09:00
parent 38fd87d8ca
commit 4961e64c92
2 changed files with 11 additions and 14 deletions

View File

@ -1,6 +1,11 @@
(module main (module main
{require {a aniseed.core}}) {require {a aniseed.core}})
(comment
;; repl imports
(do
(local a (require "aniseed.core"))))
;; for the memes. gotta have a macro example that compiles. replace with some thing useful soon ;; for the memes. gotta have a macro example that compiles. replace with some thing useful soon
(macro unless [condition & code] (macro unless [condition & code]
`(when (not ,condition) `(when (not ,condition)
@ -17,6 +22,8 @@
["bn" "bn" "[b]uffer [n]ext"] ;buffer controls ["bn" "bn" "[b]uffer [n]ext"] ;buffer controls
["bp" "bp" "[b]uffer [p]revious"] ["bp" "bp" "[b]uffer [p]revious"]
["bd" "bd" "[b]uffer [d]elete"] ["bd" "bd" "[b]uffer [d]elete"]
["fh" "Ex" "file manager"]
] ]
(a.map (lambda [[ks then-do desc]] (a.map (lambda [[ks then-do desc]]
(vim.keymap.set "n" (vim.keymap.set "n"
@ -69,6 +76,10 @@
:ignorecase true :ignorecase true
:smartcase true :smartcase true
:foldmethod "expr"
:foldexpr "v:lua.vim.treesitter.foldexpr()"
:foldlevel 99
:foldlevelstart 1
} }
(a.map-indexed (lambda [[name value]] (a.map-indexed (lambda [[name value]]
(tset vim.o name value)))) (tset vim.o name value))))
@ -79,9 +90,6 @@
(vim.keymap.set "n" "<c-y>" (.. scroll-speed "<c-y>") {:desc "scroll up"}) (vim.keymap.set "n" "<c-y>" (.. scroll-speed "<c-y>") {:desc "scroll up"})
(comment (comment
;; repl imports
(do
(local a (require "aniseed.core")))
;; playground ;; playground

View File

@ -27,17 +27,6 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.hl.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
end,
})
-- [[ Install `lazy.nvim` plugin manager ]] -- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'