From cc3289639b1507c19556e6e922f9adc9d51d4d31 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Tue, 24 Oct 2023 06:45:17 +0530 Subject: [PATCH] Breaking Change for base46 extended_integrations | Improve syntax (#2459) * performance: avoid reloading config (#2360) * performance: avoid reloading config * Rm outdated info in readme --------- Co-authored-by: Sidhanth Rathod * update nvchad load_config result path * Update utils.lua * update branch names * Fix unreachable mappings for the lsp (#2443) * add option for base46 integrations * rm nvchad_theme global * use correct conf path in lspconfig --------- Co-authored-by: georgejean Co-authored-by: KorigamiK <72932688+KorigamiK@users.noreply.github.com> --- lua/core/default_config.lua | 24 +++++++++++++++++++++--- lua/core/init.lua | 3 --- lua/plugins/configs/lspconfig.lua | 4 ++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 69d6c01..c44b1b0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -14,9 +14,6 @@ M.ui = { theme = "onedark", -- default theme transparency = false, - -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations - extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" - -- cmp themeing cmp = { icons = true, @@ -92,4 +89,25 @@ M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startu M.mappings = require "core.mappings" +M.base46 = { + integrations = { + "blankline", + "cmp", + "defaults", + "devicons", + "git", + "lsp", + "mason", + "nvchad_updater", + "nvcheatsheet", + "nvdash", + "nvimtree", + "statusline", + "syntax", + "tbline", + "telescope", + "whichkey", + }, +} + return M diff --git a/lua/core/init.lua b/lua/core/init.lua index 61de98f..8b5d9ce 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -86,9 +86,6 @@ autocmd("BufWritePost", { local config = require "nvconfig" - vim.g.nvchad_theme = config.ui.theme - vim.g.transparency = config.ui.transparency - -- statusline if config.ui.statusline.theme ~= "custom" then require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index df7f05b..5c6027c 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -3,8 +3,8 @@ local M = {} -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) local utils = require "core.utils" - local conf = require "nvconfig" - + local conf = require("nvconfig").ui.lsp + -- semanticTokens if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil