From 7d616c1cb58c83707be66c4c9cd38c275b4d0262 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 6 Feb 2025 11:45:29 +0100 Subject: [PATCH] nvim: Improve indentscope disables Improved conditional disabling of indentscope lines, e.g. in lazy and mason floats, terminals and helpfiles. --- nvim/.config/nvim/lua/plugins/base.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/base.lua b/nvim/.config/nvim/lua/plugins/base.lua index 838f938..be88221 100644 --- a/nvim/.config/nvim/lua/plugins/base.lua +++ b/nvim/.config/nvim/lua/plugins/base.lua @@ -203,6 +203,32 @@ return { draw = { animation = require("mini.indentscope").gen_animation.none() }, options = { indent_at_cursor = false }, }) + -- disable indentlines for terminals + vim.api.nvim_create_autocmd("TermOpen", { + pattern = "*", + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "lazy", + "mason", + "help", + "lspinfo", + "packer", + "checkhealth", + "man", + "gitcommit", + "TelescopePrompt", + "TelescopeResults", + "trouble", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + require("mini.map").setup() require("mini.move").setup() require("mini.operators").setup()