Skip to content

Commit

Permalink
fix(mini-indentscope): exclude special buftypes (#546)
Browse files Browse the repository at this point in the history
chore(mini-indentscope): exclude special buftypes
  • Loading branch information
Subjective authored Aug 30, 2023
1 parent f9ef240 commit f4e981a
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions lua/astrocommunity/indent/mini-indentscope/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,40 @@ return {
opts = { symbol = "", options = { try_as_border = true } },
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"Trouble",
"aerial",
"alpha",
"checkhealth",
"dashboard",
"fzf",
"help",
"lazy",
"lspinfo",
"man",
"mason",
"neo-tree",
"notify",
"null-ls-info",
"starter",
"toggleterm",
"undotree",
},
callback = function() vim.b.miniindentscope_disable = true end,
pattern = "*",
callback = function()
local excluded_filetypes = {
"Trouble",
"aerial",
"alpha",
"checkhealth",
"dashboard",
"fzf",
"help",
"lazy",
"lspinfo",
"man",
"mason",
"neo-tree",
"notify",
"null-ls-info",
"starter",
"toggleterm",
"undotree",
}
local excluded_buftypes = {
"nofile",
"prompt",
"quickfix",
"terminal",
}
if
vim.tbl_contains(excluded_filetypes, vim.bo["filetype"])
or vim.tbl_contains(excluded_buftypes, vim.bo["buftype"])
then
vim.b.miniindentscope_disable = true
end
end,
})
end,
},
Expand Down

0 comments on commit f4e981a

Please sign in to comment.