Skip to content

Commit 390bbb6

Browse files
committed
feat: opts.exluded to ignore integrations
1 parent 0094095 commit 390bbb6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lua/base46/init.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ local g = vim.g
33
local opts = require("nvconfig").base46
44
local cache_path = vim.g.base46_cache
55

6+
local function tbval_index(tb, val)
7+
for i, v in ipairs(tb) do
8+
if v == val then
9+
return i
10+
end
11+
end
12+
end
13+
614
local integrations = {
715
"blankline",
816
"blink",
@@ -26,6 +34,14 @@ for _, value in ipairs(opts.integrations) do
2634
table.insert(integrations, value)
2735
end
2836

37+
for _, value in ipairs(opts.excluded or {}) do
38+
local val_i = tbval_index(integrations, value)
39+
40+
if val_i then
41+
table.remove(integrations, val_i)
42+
end
43+
end
44+
2945
M.get_theme_tb = function(type)
3046
local name = opts.theme
3147
local present1, default_theme = pcall(require, "base46.themes." .. name)

0 commit comments

Comments
 (0)