From 44ffd7e4372862270ba92ca4144d47ecfcd187a3 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Fri, 25 Apr 2025 02:51:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20zshrc=20=D0=B8=20neovim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/autocommands.lua | 10 ++++++++++ nvim/lua/options.lua | 2 ++ 2 files changed, 12 insertions(+) diff --git a/nvim/lua/autocommands.lua b/nvim/lua/autocommands.lua index d9edd27..a0a7e5e 100644 --- a/nvim/lua/autocommands.lua +++ b/nvim/lua/autocommands.lua @@ -115,6 +115,16 @@ vim.api.nvim_create_autocmd("BufLeave", { end, }) +vim.api.nvim_create_autocmd({ "BufReadPost", "BufWinEnter", "WinEnter" }, { + pattern = "*", + callback = function(args) + -- Проверяем, что это не терминальный буфер + if not vim.startswith(vim.api.nvim_buf_get_name(args.buf), "term://") then + vim.cmd("normal zR") -- Развернуть все складки + end + end, +}) + -- vim.api.nvim_create_autocmd("InsertEnter", { -- pattern = "*", -- command = "set norelativenumber", diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index 359586c..c6e38f4 100644 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -37,6 +37,8 @@ local options = { syntax = "on", foldmethod = "expr", foldexpr = "nvim_treesitter#foldexpr()", + foldlevelstart = 99, + foldenable = true, } vim.opt.shortmess:append("c")