From 4961e64c92a1d65cdf71214eb8d9a55181c64716 Mon Sep 17 00:00:00 2001 From: ajet Date: Tue, 7 Oct 2025 16:04:02 -0900 Subject: [PATCH] add folds --- .config/nvim/fnl/init.fnl | 14 +++++++++++--- .config/nvim/init.lua | 11 ----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.config/nvim/fnl/init.fnl b/.config/nvim/fnl/init.fnl index b2b8931..64a9026 100644 --- a/.config/nvim/fnl/init.fnl +++ b/.config/nvim/fnl/init.fnl @@ -1,6 +1,11 @@ (module main {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 (macro unless [condition & code] `(when (not ,condition) @@ -17,6 +22,8 @@ ["bn" "bn" "[b]uffer [n]ext"] ;buffer controls ["bp" "bp" "[b]uffer [p]revious"] ["bd" "bd" "[b]uffer [d]elete"] + + ["fh" "Ex" "file manager"] ] (a.map (lambda [[ks then-do desc]] (vim.keymap.set "n" @@ -69,6 +76,10 @@ :ignorecase true :smartcase true + :foldmethod "expr" + :foldexpr "v:lua.vim.treesitter.foldexpr()" + :foldlevel 99 + :foldlevelstart 1 } (a.map-indexed (lambda [[name value]] (tset vim.o name value)))) @@ -79,9 +90,6 @@ (vim.keymap.set "n" "" (.. scroll-speed "") {:desc "scroll up"}) (comment - ;; repl imports - (do - (local a (require "aniseed.core"))) ;; playground diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 5b1c160..abd9873 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -27,17 +27,6 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { 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 ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'