From b3561a0c406a0f4533c3d76313c459e7215434d6 Mon Sep 17 00:00:00 2001 From: Josh <56745535+Subjective@users.noreply.github.com> Date: Fri, 14 Jul 2023 03:18:02 -0700 Subject: [PATCH] fix(zen-mode-nvim): disable mini.indentscope if enabled (#434) * fix(zen-mode-nvim): disable mini.indentscope if enabled * fix(zen-mode-nvim): indent guides fail to display upon exiting zen-mode when `show_current_context` is disabled --- lua/astrocommunity/editing-support/zen-mode-nvim/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/astrocommunity/editing-support/zen-mode-nvim/init.lua b/lua/astrocommunity/editing-support/zen-mode-nvim/init.lua index f94bd4483..1670e392f 100644 --- a/lua/astrocommunity/editing-support/zen-mode-nvim/init.lua +++ b/lua/astrocommunity/editing-support/zen-mode-nvim/init.lua @@ -27,14 +27,17 @@ return { vim.g.winbar_old = vim.wo.winbar vim.g.diagnostics_mode = 0 vim.g.indent_blankline_enabled = false + vim.b.miniindentscope_disable = true vim.wo.winbar = nil vim.diagnostic.config(require("astronvim.utils.lsp").diagnostics[vim.g.diagnostics_mode]) end, on_close = function() -- restore diagnostics, indent blankline, and winbar vim.g.diagnostics_mode = vim.g.diagnostics_mode_old vim.g.indent_blankline_enabled = vim.g.indent_blankline_enabled_old + vim.b.miniindentscope_disable = false vim.wo.winbar = vim.g.winbar_old vim.diagnostic.config(require("astronvim.utils.lsp").diagnostics[vim.g.diagnostics_mode]) + if vim.g.indent_blankline_enabled_old then vim.cmd "IndentBlanklineRefresh" end end, }, }