summaryrefslogtreecommitdiff
path: root/lua/niliara/folding.lua
diff options
context:
space:
mode:
authornil <niljo@airmail.cc>2025-01-14 20:14:37 +0100
committernil <niljo@airmail.cc>2025-01-14 20:14:37 +0100
commit2f483e68303c33d6aa3723d887b09998c3f20ee4 (patch)
tree29ec62ba1cf3f6b10cffa2efd8f6da41f5db5603 /lua/niliara/folding.lua
Diffstat (limited to 'lua/niliara/folding.lua')
-rw-r--r--lua/niliara/folding.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/niliara/folding.lua b/lua/niliara/folding.lua
new file mode 100644
index 0000000..552ae29
--- /dev/null
+++ b/lua/niliara/folding.lua
@@ -0,0 +1,10 @@
+vim.api.nvim_create_autocmd({"BufWinLeave"}, {
+ pattern = {"*.*"},
+ desc = "save view (folds), when closing file",
+ command = "mkview",
+})
+vim.api.nvim_create_autocmd({"BufWinEnter"}, {
+ pattern = {"*.*"},
+ desc = "load view (folds), when opening file",
+ command = "silent! loadview"
+})