summaryrefslogtreecommitdiff
path: root/lua/niliara/folding.lua
diff options
context:
space:
mode:
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"
+})