BREAKING CHANGE: utilize lazy.nvim fully, remove un-needed functions
This commit is contained in:
@@ -1,62 +1,24 @@
|
||||
local M = {}
|
||||
|
||||
local load_override = require("core.utils").load_override
|
||||
local utils = require "core.utils"
|
||||
|
||||
M.autopairs = function()
|
||||
local options = {
|
||||
fast_wrap = {},
|
||||
disable_filetype = { "TelescopePrompt", "vim" },
|
||||
}
|
||||
|
||||
options = load_override(options, "windwp/nvim-autopairs")
|
||||
require("nvim-autopairs").setup(options)
|
||||
|
||||
-- setup cmp for autopairs
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end
|
||||
|
||||
M.blankline = function()
|
||||
dofile(vim.g.base46_cache .. "blankline")
|
||||
|
||||
local options = {
|
||||
indentLine_enabled = 1,
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"terminal",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"TelescopePrompt",
|
||||
"TelescopeResults",
|
||||
"mason",
|
||||
"",
|
||||
},
|
||||
buftype_exclude = { "terminal" },
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = false,
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
|
||||
options = load_override(options, "lukas-reineke/indent-blankline.nvim")
|
||||
require("indent_blankline").setup(options)
|
||||
end
|
||||
|
||||
M.colorizer = function()
|
||||
local options = {}
|
||||
options = load_override(options, "NvChad/nvim-colorizer.lua")
|
||||
require("colorizer").setup(options)
|
||||
|
||||
-- execute colorizer as soon as possible
|
||||
vim.defer_fn(function()
|
||||
require("colorizer").attach_to_buffer(0)
|
||||
end, 0)
|
||||
end
|
||||
|
||||
M.comment = function()
|
||||
require("Comment").setup(load_override({}, "numToStr/Comment.nvim"))
|
||||
end
|
||||
M.blankline = {
|
||||
indentLine_enabled = 1,
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"terminal",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"TelescopePrompt",
|
||||
"TelescopeResults",
|
||||
"mason",
|
||||
"",
|
||||
},
|
||||
buftype_exclude = { "terminal" },
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = false,
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
|
||||
M.luasnip = function()
|
||||
local options = {
|
||||
@@ -64,7 +26,6 @@ M.luasnip = function()
|
||||
updateevents = "TextChanged,TextChangedI",
|
||||
}
|
||||
|
||||
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||
require("luasnip").config.set_config(options)
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
|
||||
@@ -83,9 +44,7 @@ M.luasnip = function()
|
||||
end
|
||||
|
||||
M.gitsigns = function()
|
||||
dofile(vim.g.base46_cache .. "git")
|
||||
|
||||
local options = {
|
||||
return {
|
||||
signs = {
|
||||
add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" },
|
||||
change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" },
|
||||
@@ -98,18 +57,6 @@ M.gitsigns = function()
|
||||
utils.load_mappings("gitsigns", { buffer = bufnr })
|
||||
end,
|
||||
}
|
||||
|
||||
options = load_override(options, "lewis6991/gitsigns.nvim")
|
||||
require("gitsigns").setup(options)
|
||||
end
|
||||
|
||||
M.devicons = function()
|
||||
dofile(vim.g.base46_cache .. "devicons")
|
||||
|
||||
local options = { override = require("nvchad_ui.icons").devicons }
|
||||
options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons")
|
||||
|
||||
require("nvim-web-devicons").setup(options)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user