reduce some LOC

This commit is contained in:
siduck 2023-01-29 23:30:13 +05:30
parent 4990b23935
commit 2ee1ada911
7 changed files with 10 additions and 53 deletions

View File

@ -14,11 +14,9 @@ M.ui = {
-- hl = highlights -- hl = highlights
hl_add = {}, hl_add = {},
hl_override = {}, hl_override = {},
changed_themes = {}, changed_themes = {},
theme_toggle = { "onedark", "one_light" }, theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme theme = "onedark", -- default theme
transparency = false, transparency = false,
-- cmp themeing -- cmp themeing

View File

@ -49,13 +49,7 @@ opt.whichwrap:append "<>[]hl"
g.mapleader = " " g.mapleader = " "
local default_providers = { -- disable some default providers
"node", for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
"perl",
"python3",
"ruby",
}
for _, provider in ipairs(default_providers) do
vim.g["loaded_" .. provider .. "_provider"] = 0 vim.g["loaded_" .. provider .. "_provider"] = 0
end end

View File

@ -3,7 +3,6 @@ local merge_tb = vim.tbl_deep_extend
M.load_config = function() M.load_config = function()
local config = require "core.default_config" local config = require "core.default_config"
local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1]
if chadrc_path then if chadrc_path then
@ -57,6 +56,7 @@ M.load_mappings = function(section, mapping_opt)
if section_values.plugin then if section_values.plugin then
return return
end end
section_values.plugin = nil section_values.plugin = nil
for mode, mode_values in pairs(section_values) do for mode, mode_values in pairs(section_values) do

View File

@ -1,12 +1,6 @@
return { return {
defaults = { defaults = { lazy = true },
lazy = true, install = { colorscheme = { "nvchad" } },
},
install = {
-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "nvchad" },
},
ui = { ui = {
icons = { icons = {

View File

@ -1,27 +0,0 @@
require "base46.term"
local options = {
terminals = {
list = {},
type_opts = {
float = {
relative = "editor",
row = 0.3,
col = 0.25,
width = 0.5,
height = 0.4,
border = "single",
},
horizontal = { location = "rightbelow", split_ratio = 0.3 },
vertical = { location = "rightbelow", split_ratio = 0.5 },
},
},
behavior = {
close_on_exit = true,
auto_insert = true,
},
enable_new_mappings = true,
}
options = require("core.utils").load_override(options, "NvChad/nvterm")
require("nvterm").setup(options)

View File

@ -1,18 +1,14 @@
dofile(vim.g.base46_cache .. "syntax") dofile(vim.g.base46_cache .. "syntax")
local options = { local options = {
ensure_installed = { ensure_installed = { "lua" },
"lua",
},
highlight = { highlight = {
enable = true, enable = true,
use_languagetree = true, use_languagetree = true,
}, },
indent = { indent = { enable = true },
enable = true,
},
} }
-- check for any override -- check for any override

View File

@ -20,7 +20,9 @@ local plugins = {
["NvChad/nvterm"] = { ["NvChad/nvterm"] = {
config = function() config = function()
require "plugins.configs.nvterm" require "base46.term"
local options = require("core.utils").load_override({}, "NvChad/nvterm")
require("nvterm").setup(options)
end, end,
init = function() init = function()
require("core.utils").load_mappings "nvterm" require("core.utils").load_mappings "nvterm"