From 5baca395f3c636ea12b64257c99a0dde59c10d1f Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Tue, 21 Jul 2026 22:08:29 +0200 Subject: [PATCH 1/3] chore(types): allow string type for integrations opt When using custom integrations loaded from the new integrations_dir opt, it produces type/linter errors, as the used custom integrations are not part of the enum values. Allow strings as well for the type, which is the sweat spot by allowing for type based completions when defining the upstream integrations, but also allow custom integrations without linter type errors. --- nvchad_types/all_hl_groups.lua | 3 ++- scripts/update-nvchad-types.lua | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nvchad_types/all_hl_groups.lua b/nvchad_types/all_hl_groups.lua index b05a4e46..a0e2cb53 100644 --- a/nvchad_types/all_hl_groups.lua +++ b/nvchad_types/all_hl_groups.lua @@ -1660,4 +1660,5 @@ error("Requiring a meta file") ---| "'treesitter'" ---| "'trouble'" ---| "'vim-illuminate'" ----| "'whichkey'" \ No newline at end of file +---| "'whichkey'" +---| string \ No newline at end of file diff --git a/scripts/update-nvchad-types.lua b/scripts/update-nvchad-types.lua index fd32a81f..124b23e2 100644 --- a/scripts/update-nvchad-types.lua +++ b/scripts/update-nvchad-types.lua @@ -87,6 +87,9 @@ local gen_highlights = function() end end end + -- allow string type to keep completion through enum values + -- while avoiding linter warnings for custom integrations. + table.insert(contents, string.format "---| string") for name, integration in vim.spairs(hlgroups) do if string.sub(name, 1, 1) == "@" then From e71228e63a0c6948274ece97d0f0bae5a7c8e8e3 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Tue, 21 Jul 2026 22:09:50 +0200 Subject: [PATCH 2/3] chore(types): add missing type field for integrations_dir --- nvchad_types/chadrc.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvchad_types/chadrc.lua b/nvchad_types/chadrc.lua index 6e099667..95f5cbb0 100644 --- a/nvchad_types/chadrc.lua +++ b/nvchad_types/chadrc.lua @@ -46,6 +46,8 @@ --- You can try out the theme by executing `:Telescope themes` --- see https://github.com/NvChad/base46/tree/master/lua/base46/themes ---@field theme? ThemeName +--- module name for loading custom integrations +---@field integrations_dir? string ---@field integrations? Base46Integrations[] --- UI related configuration From 229321035360b90d76e6209534760bc44946fd29 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Tue, 21 Jul 2026 22:11:55 +0200 Subject: [PATCH 3/3] docs(integrations): document integrations_dir nvconfig --- doc/nvui.txt | 10 ++++++++++ lua/nvconfig.lua | 1 + 2 files changed, 11 insertions(+) diff --git a/doc/nvui.txt b/doc/nvui.txt index a978548f..221b2855 100644 --- a/doc/nvui.txt +++ b/doc/nvui.txt @@ -623,6 +623,16 @@ It's preferred to put the dofile code in your plugin's config func end } < +To include custom integrations, use the `base46.integrations_dir` option to +define a module name that contains the custom integration files. Loading +from the custom module location will only be tried if there is no matching +official integration. +>lua + M.base46 = { + integrations_dir = "foo.integrations", + integrations = { "dap", "hop", "customname" }, + } +< ------------------------------------------------------------------------------ 6.5 Local themes *nvui.base46.local_themes* diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index b08f73b6..4134ac2f 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -4,6 +4,7 @@ local options = { theme = "onedark", -- default theme hl_add = {}, hl_override = {}, + integrations_dir = nil, integrations = {}, changed_themes = {}, transparency = false,