commit
dd5457d8f0
|
|
@ -0,0 +1,2 @@
|
|||
## Special Thanks
|
||||
- [NvChad](https://github.com/nvchad/nvchad)
|
||||
57
init.lua
57
init.lua
|
|
@ -1,49 +1,26 @@
|
|||
vim.defer_fn(function()
|
||||
pcall(require, "impatient")
|
||||
end, 0)
|
||||
|
||||
-- setup packer + plugins
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
|
||||
print "Cloning packer .."
|
||||
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
|
||||
|
||||
-- install plugins + compile their configs
|
||||
vim.cmd "packadd packer.nvim"
|
||||
require "plugins"
|
||||
vim.cmd "PackerSync"
|
||||
|
||||
-- install binaries from mason.nvim & tsparsers
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "PackerComplete",
|
||||
callback = function()
|
||||
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
|
||||
require("packer").loader "nvim-treesitter"
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local modules = {
|
||||
"core.options",
|
||||
"core.packer",
|
||||
}
|
||||
require "core.options"
|
||||
require("core.utils").load_mappings()
|
||||
-- require("colors").core_setup()
|
||||
|
||||
-- add binaries installed by mason.nvim to path
|
||||
vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin"
|
||||
|
||||
for _, module in ipairs(modules) do
|
||||
local ok, err = pcall(require, module)
|
||||
if not ok then
|
||||
error("Error loading " .. module .. "\n\n" .. err)
|
||||
end
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require "plugins"
|
||||
|
||||
require("core.utils").load_mappings()
|
||||
-- require("colors").core_setup()
|
||||
|
||||
-- Set colorscheme
|
||||
require('rose-pine').setup({
|
||||
disable_background = true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" },
|
||||
"LuaSnip": { "branch": "master", "commit": "af60ac12fa1349dbad479fc1e95d5aea977c0c37" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"crates.nvim": { "branch": "main", "commit": "707ed7d6f8927a5ec0c241aa793f694f1b05f731" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "046e4d3491baf664e0eef5231d28beb49333578b" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "addd6e174a85fc1c4007ab0b65d77e6555b417bf" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" },
|
||||
"kterm": { "branch": "main", "commit": "91bd6e3750a4c9302abe87260256cca97f71666b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "4739c2d95af17acb786ed33445f59b7b13671417" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||
"mason.nvim": { "branch": "main", "commit": "d825d3d1612c31caaff60901e0a6600cab8624d3" },
|
||||
"neovim": { "branch": "main", "commit": "845a6ad5443e3559dde42910c4523a5835c9233b" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "760e27df4dd966607e8fb7fd8b6b93e3c7d2e193" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d228bcf7cd94611929482a09e114a42c41fe81a8" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42c3a3c51e8fef027655e7facd293aae7c6984bb" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "df584e84393ef255f5b8cbd709677d6a3a5bf42f" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2f32775405f6706348b71d0bb8a15a22852a61e4" },
|
||||
"vimwiki": { "branch": "dev", "commit": "fea8bee382b2051b0137fd2cacf0862823ee69b3" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "e4fa445065a2bb0bbc3cca85346b67817f28e83e" }
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
local M = {}
|
||||
|
||||
M.lazy = function(install_path)
|
||||
print "Bootstrapping lazy.nvim .."
|
||||
|
||||
vim.fn.system {
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
install_path,
|
||||
}
|
||||
|
||||
vim.opt.rtp:prepend(install_path)
|
||||
|
||||
-- install plugins + compile their configs
|
||||
require "plugins"
|
||||
|
||||
require("lazy").load { plugins = "nvim-treesitter" }
|
||||
|
||||
-- install binaries from mason.nvim & tsparsers on LazySync
|
||||
vim.schedule(function()
|
||||
vim.cmd "bw | silent! MasonInstallAll" -- close lazy window
|
||||
end, 0)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
local M = {}
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
-- require("packer").loader(tb.plugins)
|
||||
-- This must be used for plugins that need to be loaded just after a file
|
||||
-- ex : treesitter, lspconfig etc
|
||||
M.lazy_load = function(tb)
|
||||
autocmd(tb.events, {
|
||||
group = vim.api.nvim_create_augroup(tb.augroup_name, {}),
|
||||
callback = function()
|
||||
if tb.condition() then
|
||||
vim.api.nvim_del_augroup_by_name(tb.augroup_name)
|
||||
|
||||
-- dont defer for treesitter as it will show slow highlighting
|
||||
-- This deferring only happens only when we do "nvim filename"
|
||||
if tb.plugin ~= "nvim-treesitter" then
|
||||
vim.defer_fn(function()
|
||||
require("packer").loader(tb.plugin)
|
||||
if tb.plugin == "nvim-lspconfig" then
|
||||
vim.cmd "silent! do FileType"
|
||||
end
|
||||
end, 0)
|
||||
else
|
||||
require("packer").loader(tb.plugin)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- load certain plugins only when there's a file opened in the buffer
|
||||
-- if "nvim filename" is executed -> load the plugin after nvim gui loads
|
||||
-- This gives an instant preview of nvim with the file opened
|
||||
|
||||
M.on_file_open = function(plugin_name)
|
||||
M.lazy_load {
|
||||
events = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
augroup_name = "BeLazyOnFileOpen" .. plugin_name,
|
||||
plugin = plugin_name,
|
||||
condition = function()
|
||||
local file = vim.fn.expand "%"
|
||||
return file ~= "[packer]" and file ~= ""
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
M.packer_cmds = {
|
||||
"PackerSnapshot",
|
||||
"PackerSnapshotRollback",
|
||||
"PackerSnapshotDelete",
|
||||
"PackerInstall",
|
||||
"PackerUpdate",
|
||||
"PackerSync",
|
||||
"PackerClean",
|
||||
"PackerCompile",
|
||||
"PackerStatus",
|
||||
"PackerProfile",
|
||||
"PackerLoad",
|
||||
}
|
||||
|
||||
M.treesitter_cmds = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" }
|
||||
M.mason_cmds = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }
|
||||
|
||||
M.gitsigns = function()
|
||||
autocmd({ "BufRead" }, {
|
||||
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
||||
callback = function()
|
||||
vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse")
|
||||
if vim.v.shell_error == 0 then
|
||||
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
||||
vim.schedule(function()
|
||||
require("packer").loader "gitsigns.nvim"
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -42,29 +42,3 @@ opt.timeoutlen = 400
|
|||
|
||||
-- interval for writing swap file to disk, also used by gitsigns
|
||||
opt.updatetime = 250
|
||||
|
||||
-- disable some builtin vim plugins
|
||||
local default_plugins = {
|
||||
"2html_plugin",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
-- "netrw",
|
||||
-- "netrwPlugin",
|
||||
-- "netrwSettings",
|
||||
-- "netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimball_plugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
}
|
||||
|
||||
for _, plugin in pairs(default_plugins) do
|
||||
g["loaded_" .. plugin] = 1
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
M.run = function(plugins)
|
||||
local present, packer = pcall(require, "packer")
|
||||
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local final_table = {}
|
||||
for key, _ in pairs(plugins) do
|
||||
plugins[key][1] = key
|
||||
final_table[#final_table + 1] = plugins[key]
|
||||
end
|
||||
|
||||
|
||||
packer.init({
|
||||
auto_clean = true,
|
||||
compile_on_sync = true,
|
||||
git = { clone_timeout = 6000 },
|
||||
display = {
|
||||
working_sym = "ﲊ",
|
||||
error_sym = "✗ ",
|
||||
done_sym = " ",
|
||||
removed_sym = " ",
|
||||
moved_sym = "",
|
||||
open_fn = function()
|
||||
return require("packer.util").float { border = "single" }
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
packer.startup(function(use)
|
||||
for _, v in pairs(final_table) do
|
||||
use(v)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -1,6 +1,15 @@
|
|||
local M = {}
|
||||
local merge_tb = vim.tbl_deep_extend
|
||||
|
||||
M.format_plugins = function(plugins) local final_table = {}
|
||||
for key, _ in pairs(plugins) do
|
||||
plugins[key][1] = key
|
||||
final_table[#final_table + 1] = plugins[key]
|
||||
end
|
||||
|
||||
return final_table
|
||||
end
|
||||
|
||||
M.close_buffer = function(bufnr)
|
||||
if vim.bo.buftype == "terminal" then
|
||||
vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide")
|
||||
|
|
@ -43,4 +52,32 @@ M.load_mappings = function(section, mapping_opt)
|
|||
end
|
||||
end
|
||||
|
||||
M.lazy_load = function(plugin)
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, {
|
||||
group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}),
|
||||
callback = function()
|
||||
local file = vim.fn.expand "%"
|
||||
local condition = file ~= "NvimTree_1" and file ~= "[lazy]" and file ~= ""
|
||||
|
||||
if condition then
|
||||
vim.api.nvim_del_augroup_by_name("BeLazyOnFileOpen" .. plugin)
|
||||
|
||||
-- dont defer for treesitter as it will show slow highlighting
|
||||
-- This deferring only happens only when we do "nvim filename"
|
||||
if plugin ~= "nvim-treesitter" then
|
||||
vim.schedule(function()
|
||||
require("lazy").load { plugins = plugin }
|
||||
|
||||
if plugin == "nvim-lspconfig" then
|
||||
vim.cmd "silent! do FileType"
|
||||
end
|
||||
end, 0)
|
||||
else
|
||||
require("lazy").load { plugins = plugin }
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
return {
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- install = {
|
||||
-- try to load one of these colorschemes when starting an installation during startup
|
||||
-- colorscheme = { "rose-pine" },
|
||||
-- },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = "鈴 ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -32,12 +32,13 @@ M.luasnip = function()
|
|||
}
|
||||
|
||||
luasnip.config.set_config(options)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
if
|
||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
and not require("luasnip").session.jump_active
|
||||
then
|
||||
require("luasnip").unlink_current()
|
||||
|
|
@ -99,7 +100,7 @@ M.blankline = function()
|
|||
"help",
|
||||
"terminal",
|
||||
"alpha",
|
||||
"packer",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"TelescopePrompt",
|
||||
"TelescopeResults",
|
||||
|
|
@ -136,6 +137,7 @@ M.colorizer = function()
|
|||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
mode = "background", -- Set the display mode.
|
||||
tailwind = true,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +1,46 @@
|
|||
-- All plugins have lazy = true by default, to load a plugin on startup just lazy=false
|
||||
local plugins = {
|
||||
["wbthomason/packer.nvim"] = {
|
||||
cmd = require("core.lazy_load").packer_cmds,
|
||||
config = function()
|
||||
require "plugins"
|
||||
end,
|
||||
},
|
||||
['nvim-lua/plenary.nvim'] = {},
|
||||
|
||||
["nvim-treesitter/nvim-treesitter"] = {
|
||||
module = "nvim-treesitter",
|
||||
setup = function()
|
||||
require("core.lazy_load").on_file_open "nvim-treesitter"
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-treesitter"
|
||||
end,
|
||||
cmd = require("core.lazy_load").treesitter_cmds,
|
||||
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" },
|
||||
run = ":TSUpdate",
|
||||
config = function()
|
||||
require "plugins.configs.treesitter"
|
||||
end,
|
||||
},
|
||||
|
||||
-- git
|
||||
["lewis6991/gitsigns.nvim"] = {
|
||||
ft = "gitcommit",
|
||||
setup = function()
|
||||
require("core.lazy_load").gitsigns()
|
||||
init = function()
|
||||
-- load gitsigns only when a git file is opened
|
||||
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
||||
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
||||
callback = function()
|
||||
vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse")
|
||||
if vim.v.shell_error == 0 then
|
||||
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
||||
vim.schedule(function()
|
||||
require("lazy").load { plugins = "gitsigns.nvim" }
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
require("plugins.configs.others").gitsigns()
|
||||
end,
|
||||
},
|
||||
|
||||
['nvim-lua/plenary.nvim'] = {},
|
||||
|
||||
["nvim-telescope/telescope.nvim"] = {
|
||||
cmd = "Telescope",
|
||||
config = function()
|
||||
require "plugins.configs.telescope"
|
||||
end,
|
||||
setup = function()
|
||||
init = function()
|
||||
require("core.utils").load_mappings "telescope"
|
||||
end,
|
||||
},
|
||||
|
|
@ -44,16 +48,15 @@ local plugins = {
|
|||
-- lsp stuff
|
||||
|
||||
["williamboman/mason.nvim"] = {
|
||||
cmd = require("core.lazy_load").mason_cmds,
|
||||
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
||||
config = function()
|
||||
require "plugins.configs.mason"
|
||||
end,
|
||||
},
|
||||
|
||||
["neovim/nvim-lspconfig"] = {
|
||||
opt = true,
|
||||
setup = function()
|
||||
require("core.lazy_load").on_file_open "nvim-lspconfig"
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-lspconfig"
|
||||
end,
|
||||
config = function()
|
||||
require "plugins.configs.lspconfig"
|
||||
|
|
@ -61,7 +64,9 @@ local plugins = {
|
|||
},
|
||||
|
||||
["simrat39/rust-tools.nvim"] = {
|
||||
after = "nvim-lspconfig",
|
||||
-- after = "nvim-lspconfig",
|
||||
event = "BufEnter *.rs",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("plugins.configs.rust-tools")
|
||||
require("core.utils").load_mappings "rust"
|
||||
|
|
@ -77,47 +82,45 @@ local plugins = {
|
|||
|
||||
-- load luasnips + cmp related in insert mode only
|
||||
|
||||
["rafamadriz/friendly-snippets"] = {},
|
||||
|
||||
["hrsh7th/nvim-cmp"] = {
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require "plugins.configs.cmp"
|
||||
end,
|
||||
},
|
||||
|
||||
["L3MON4D3/LuaSnip"] = {
|
||||
requires = "friendly-snippets",
|
||||
after = "nvim-cmp",
|
||||
dependencies = {
|
||||
{
|
||||
-- snippet plugin
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("plugins.configs.others").luasnip()
|
||||
end,
|
||||
},
|
||||
|
||||
["saadparwaiz1/cmp_luasnip"] = {
|
||||
after = "LuaSnip",
|
||||
-- autopairing of (){}[] etc
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("plugins.configs.others").autopairs()
|
||||
end,
|
||||
},
|
||||
|
||||
["hrsh7th/cmp-nvim-lua"] = {
|
||||
after = "cmp_luasnip",
|
||||
-- cmp sources plugins
|
||||
{
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
},
|
||||
|
||||
["hrsh7th/cmp-nvim-lsp"] = {
|
||||
after = "cmp-nvim-lua",
|
||||
config = function()
|
||||
require "plugins.configs.cmp"
|
||||
end,
|
||||
},
|
||||
|
||||
["hrsh7th/cmp-buffer"] = {
|
||||
after = "cmp-nvim-lsp",
|
||||
},
|
||||
|
||||
["hrsh7th/cmp-path"] = {
|
||||
after = "cmp-buffer",
|
||||
},
|
||||
|
||||
-- misc
|
||||
|
||||
['vimwiki/vimwiki'] = {
|
||||
config = function()
|
||||
event = "VeryLazy",
|
||||
init = function ()
|
||||
vim.g.vimwiki_list = {
|
||||
{
|
||||
path = '~/dox/notes',
|
||||
|
|
@ -128,30 +131,21 @@ local plugins = {
|
|||
end,
|
||||
},
|
||||
|
||||
["windwp/nvim-autopairs"] = {
|
||||
after = "nvim-cmp",
|
||||
config = function()
|
||||
require("plugins.configs.others").autopairs()
|
||||
end,
|
||||
},
|
||||
|
||||
["numToStr/Comment.nvim"] = {
|
||||
module = "Comment",
|
||||
keys = { "gc", "gb" },
|
||||
-- keys = { "gc", "gb" },
|
||||
config = function()
|
||||
require("plugins.configs.others").comment()
|
||||
end,
|
||||
setup = function()
|
||||
init = function()
|
||||
require("core.utils").load_mappings "comment"
|
||||
end,
|
||||
},
|
||||
|
||||
["krolyxon/kterm"] = {
|
||||
module = "kterm",
|
||||
config = function()
|
||||
require "plugins.configs.kterm"
|
||||
end,
|
||||
setup = function()
|
||||
init = function()
|
||||
require("core.utils").load_mappings "kterm"
|
||||
end,
|
||||
},
|
||||
|
|
@ -163,15 +157,16 @@ local plugins = {
|
|||
config = function()
|
||||
require("plugins.configs.others").blankline()
|
||||
end,
|
||||
setup = function()
|
||||
init = function()
|
||||
require("core.utils").lazy_load "indent-blankline.nvim"
|
||||
require("core.utils").load_mappings "blankline"
|
||||
end,
|
||||
},
|
||||
|
||||
["nvchad/nvim-colorizer.lua"] = {
|
||||
opt = true,
|
||||
setup = function()
|
||||
require("core.lazy_load").on_file_open "nvim-colorizer.lua"
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-colorizer.lua"
|
||||
end,
|
||||
config = function()
|
||||
require("plugins.configs.others").colorizer()
|
||||
|
|
@ -179,6 +174,7 @@ local plugins = {
|
|||
},
|
||||
|
||||
["nvim-lualine/lualine.nvim"] = {
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("plugins.configs.statusline")
|
||||
end,
|
||||
|
|
@ -186,20 +182,26 @@ local plugins = {
|
|||
|
||||
-- Only load whichkey after all the gui
|
||||
["folke/which-key.nvim"] = {
|
||||
disable = false,
|
||||
module = "which-key",
|
||||
enabled = true,
|
||||
keys = { "<leader>", "\"", "'", "`" },
|
||||
config = function()
|
||||
require "plugins.configs.whichkey"
|
||||
end,
|
||||
setup = function()
|
||||
init = function()
|
||||
require("core.utils").load_mappings "whichkey"
|
||||
end,
|
||||
},
|
||||
|
||||
["rose-pine/neovim"] = {},
|
||||
|
||||
-- speed up deffered plugins
|
||||
["lewis6991/impatient.nvim"] = {},
|
||||
}
|
||||
require("core.packer").run(plugins)
|
||||
|
||||
plugins = require("core.utils").format_plugins(plugins)
|
||||
|
||||
-- pin commits for all default plugins
|
||||
for _, value in pairs(plugins) do
|
||||
value.pin = true
|
||||
end
|
||||
|
||||
-- load lazy.nvim options
|
||||
local lazy_config = require "plugins.configs.lazy_nvim"
|
||||
require("lazy").setup(plugins, lazy_config)
|
||||
|
|
|
|||
Reference in New Issue