go stuff & a mess more
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
|||||||
|
plugin
|
||||||
|
# custom
|
||||||
|
spell
|
||||||
|
ftplugin
|
||||||
|
syntax
|
||||||
|
coc-settings.json
|
||||||
|
.luarc.json
|
||||||
|
lazy-lock.json
|
||||||
|
after
|
||||||
|
**/.DS_Store
|
||||||
|
.elixir-tools/
|
||||||
@@ -5,8 +5,8 @@ local M = {}
|
|||||||
local highlights = require "custom.highlights"
|
local highlights = require "custom.highlights"
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "pastelDark",
|
theme = "everblush",
|
||||||
theme_toggle = { "pastelDark", "one_light" },
|
theme_toggle = { "everblush", "one_light" },
|
||||||
|
|
||||||
hl_override = highlights.override,
|
hl_override = highlights.override,
|
||||||
hl_add = highlights.add,
|
hl_add = highlights.add,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
-- local util = require "lspconfig/util"
|
local util = require "lspconfig/util"
|
||||||
|
|
||||||
-- if you just want default config for the servers then put them in a table
|
-- if you just want default config for the servers then put them in a table
|
||||||
local servers = { "html", "cssls", "tsserver", "clangd" }
|
local servers = { "html", "cssls", "ts_ls", "clangd" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
@@ -13,6 +13,30 @@ for _, lsp in ipairs(servers) do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
lspconfig.gopls.setup {
|
||||||
|
cmd = { "gopls" },
|
||||||
|
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
|
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
completeUnimported = true,
|
||||||
|
usePlaceholders = true,
|
||||||
|
analyses = {
|
||||||
|
unusedParameters = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.ts_ls.setup {
|
||||||
|
filetypes = { "javascript", "typescript", "typescriptreact", "typescript.tsx" },
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>f", "<cmd>lua vim.lsp.buf.format()<CR>", opts)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
-- lspconfig.rust_analyzer.setup({
|
-- lspconfig.rust_analyzer.setup({
|
||||||
-- on_attach = on_attach,
|
-- on_attach = on_attach,
|
||||||
-- capabilities = capabilities,
|
-- capabilities = capabilities,
|
||||||
@@ -26,5 +50,5 @@ end
|
|||||||
-- }
|
-- }
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
--
|
--
|
||||||
-- lspconfig.pyright.setup { blabla}
|
-- lspconfig.pyright.setup { blabla}
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ M.general = {
|
|||||||
|
|
||||||
-- ["<A-Space>"] = cmp.mapping.complete(),
|
-- ["<A-Space>"] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
["gb"] = { "<cmd>Gitsigns blame<CR>", "Git blame" },
|
||||||
|
["gB"] = { "<cmd>Gitsigns blame_line<CR>", "Git blame line" },
|
||||||
|
|
||||||
["gu"] = { "<cmd>diffget //2<CR>", "Select left in conflict" },
|
["gu"] = { "<cmd>diffget //2<CR>", "Select left in conflict" },
|
||||||
["gh"] = { "<cmd>diffget //3<CR>", "Select right in conflict" },
|
["gh"] = { "<cmd>diffget //3<CR>", "Select right in conflict" },
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ local plugins = {
|
|||||||
opts = vim.tbl_deep_extend("force", overrides.mason, {
|
opts = vim.tbl_deep_extend("force", overrides.mason, {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"rust-analyzer",
|
"rust-analyzer",
|
||||||
|
"gopls",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@@ -143,8 +144,17 @@ local plugins = {
|
|||||||
|
|
||||||
{ "famiu/bufdelete.nvim", lazy = false },
|
{ "famiu/bufdelete.nvim", lazy = false },
|
||||||
|
|
||||||
|
{ "fladson/vim-kitty", ft = { "kitty" } },
|
||||||
|
|
||||||
-- { "tpope/vim-fugitive", lazy = false },
|
-- { "tpope/vim-fugitive", lazy = false },
|
||||||
|
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = function(_, opts)
|
||||||
|
require("gitsigns").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
enabled = false,
|
enabled = false,
|
||||||
@@ -158,6 +168,7 @@ local plugins = {
|
|||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
@@ -201,6 +212,39 @@ local plugins = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
dependencies = { -- optional packages
|
||||||
|
"ray-x/guihua.lua",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("go").setup()
|
||||||
|
end,
|
||||||
|
event = { "CmdlineEnter" },
|
||||||
|
ft = { "go", "gomod" },
|
||||||
|
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup {
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
-- Conform will run multiple formatters sequentially
|
||||||
|
python = { "isort", "black" },
|
||||||
|
-- You can customize some of the format options for the filetype (:help conform.format)
|
||||||
|
rust = { "rustfmt", lsp_format = "fallback" },
|
||||||
|
-- Conform will run the first available formatter
|
||||||
|
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
go = { { "gofmt" } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- "rouge8/neotest-rust",
|
-- "rouge8/neotest-rust",
|
||||||
-- config = function() end,
|
-- config = function() end,
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
local M = {}
|
||||||
|
local utils = require "core.utils"
|
||||||
|
|
||||||
|
M.blankline = {
|
||||||
|
indentLine_enabled = 1,
|
||||||
|
filetype_exclude = {
|
||||||
|
"help",
|
||||||
|
"terminal",
|
||||||
|
"lazy",
|
||||||
|
"lspinfo",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"TelescopeResults",
|
||||||
|
"mason",
|
||||||
|
"nvdash",
|
||||||
|
"nvcheatsheet",
|
||||||
|
"",
|
||||||
|
},
|
||||||
|
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(opts)
|
||||||
|
require("luasnip").config.set_config(opts)
|
||||||
|
|
||||||
|
-- vscode format
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
|
||||||
|
|
||||||
|
-- snipmate format
|
||||||
|
require("luasnip.loaders.from_snipmate").load()
|
||||||
|
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
|
||||||
|
|
||||||
|
-- lua format
|
||||||
|
require("luasnip.loaders.from_lua").load()
|
||||||
|
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
|
callback = function()
|
||||||
|
if
|
||||||
|
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||||
|
and not require("luasnip").session.jump_active
|
||||||
|
then
|
||||||
|
require("luasnip").unlink_current()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- M.gitsigns = {
|
||||||
|
-- signs = {
|
||||||
|
-- add = { text = "│" },
|
||||||
|
-- change = { text = "│" },
|
||||||
|
-- delete = { text = "" },
|
||||||
|
-- topdelete = { text = "‾" },
|
||||||
|
-- changedelete = { text = "~" },
|
||||||
|
-- untracked = { text = "│" },
|
||||||
|
-- },
|
||||||
|
-- on_attach = function(bufnr)
|
||||||
|
-- utils.load_mappings("gitsigns", { buffer = bufnr })
|
||||||
|
-- end,
|
||||||
|
-- }
|
||||||
|
|
||||||
|
M.gitsigns = {
|
||||||
|
signs = {
|
||||||
|
add = { text = '┃' },
|
||||||
|
change = { text = '┃' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
untracked = { text = '┆' },
|
||||||
|
},
|
||||||
|
signs_staged = {
|
||||||
|
add = { text = '┃' },
|
||||||
|
change = { text = '┃' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
untracked = { text = '┆' },
|
||||||
|
},
|
||||||
|
signs_staged_enable = true,
|
||||||
|
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||||
|
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||||
|
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||||
|
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||||
|
watch_gitdir = {
|
||||||
|
follow_files = true
|
||||||
|
},
|
||||||
|
auto_attach = true,
|
||||||
|
attach_to_untracked = false,
|
||||||
|
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||||
|
current_line_blame_opts = {
|
||||||
|
virt_text = true,
|
||||||
|
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||||
|
delay = 1000,
|
||||||
|
ignore_whitespace = false,
|
||||||
|
virt_text_priority = 100,
|
||||||
|
},
|
||||||
|
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||||
|
sign_priority = 6,
|
||||||
|
update_debounce = 100,
|
||||||
|
status_formatter = nil, -- Use default
|
||||||
|
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||||
|
preview_config = {
|
||||||
|
-- Options passed to nvim_open_win
|
||||||
|
border = 'single',
|
||||||
|
style = 'minimal',
|
||||||
|
relative = 'cursor',
|
||||||
|
row = 0,
|
||||||
|
col = 1
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,277 @@
|
|||||||
|
-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false
|
||||||
|
-- List of all default plugins & their definitions
|
||||||
|
local default_plugins = {
|
||||||
|
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
||||||
|
{
|
||||||
|
"NvChad/base46",
|
||||||
|
branch = "v2.0",
|
||||||
|
build = function()
|
||||||
|
require("base46").load_all_highlights()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"NvChad/ui",
|
||||||
|
branch = "v2.0",
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"NvChad/nvterm",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "nvterm"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require "base46.term"
|
||||||
|
require("nvterm").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").lazy_load "nvim-colorizer.lua"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("colorizer").setup(opts)
|
||||||
|
|
||||||
|
-- execute colorizer as soon as possible
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require("colorizer").attach_to_buffer(0)
|
||||||
|
end, 0)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
opts = function()
|
||||||
|
return { override = require "nvchad.icons.devicons" }
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "devicons")
|
||||||
|
require("nvim-web-devicons").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
version = "2.20.7",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").lazy_load "indent-blankline.nvim"
|
||||||
|
end,
|
||||||
|
opts = function()
|
||||||
|
return require("plugins.configs.others").blankline
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("core.utils").load_mappings "blankline"
|
||||||
|
dofile(vim.g.base46_cache .. "blankline")
|
||||||
|
require("indent_blankline").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").lazy_load "nvim-treesitter"
|
||||||
|
end,
|
||||||
|
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
||||||
|
build = ":TSUpdate",
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.treesitter"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "syntax")
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- git stuff
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
lazy = false,
|
||||||
|
ft = { "gitcommit", "diff" },
|
||||||
|
-- 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.jobstart({ "git", "-C", vim.loop.cwd(), "rev-parse" }, {
|
||||||
|
-- on_exit = function(_, return_code)
|
||||||
|
-- if return_code == 0 then
|
||||||
|
-- vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
||||||
|
-- vim.schedule(function()
|
||||||
|
-- require("lazy").load { plugins = { "gitsigns.nvim" } }
|
||||||
|
-- end)
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
opts = function()
|
||||||
|
return require("plugins.configs.others").gitsigns
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "git")
|
||||||
|
require("gitsigns").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lsp stuff
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.mason"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "mason")
|
||||||
|
require("mason").setup(opts)
|
||||||
|
|
||||||
|
-- custom nvchad cmd to install all mason binaries listed
|
||||||
|
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
||||||
|
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
vim.g.mason_binaries_list = opts.ensure_installed
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").lazy_load "nvim-lspconfig"
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require "plugins.configs.lspconfig"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- load luasnips + cmp related in insert mode only
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
-- snippet plugin
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
dependencies = "rafamadriz/friendly-snippets",
|
||||||
|
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
|
||||||
|
config = function(_, opts)
|
||||||
|
require("plugins.configs.others").luasnip(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- autopairing of (){}[] etc
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
opts = {
|
||||||
|
fast_wrap = {},
|
||||||
|
disable_filetype = { "TelescopePrompt", "vim" },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("nvim-autopairs").setup(opts)
|
||||||
|
|
||||||
|
-- setup cmp for autopairs
|
||||||
|
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||||
|
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- cmp sources plugins
|
||||||
|
{
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"hrsh7th/cmp-nvim-lua",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.cmp"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("cmp").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "gcc", mode = "n", desc = "Comment toggle current line" },
|
||||||
|
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||||
|
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||||
|
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||||
|
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||||
|
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "comment"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("Comment").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- file managing , picker etc
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "nvimtree"
|
||||||
|
end,
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.nvimtree"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "nvimtree")
|
||||||
|
require("nvim-tree").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } },
|
||||||
|
cmd = "Telescope",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "telescope"
|
||||||
|
end,
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.telescope"
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "telescope")
|
||||||
|
local telescope = require "telescope"
|
||||||
|
telescope.setup(opts)
|
||||||
|
|
||||||
|
-- load extensions
|
||||||
|
for _, ext in ipairs(opts.extensions_list) do
|
||||||
|
telescope.load_extension(ext)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Only load whichkey after all the gui
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "whichkey"
|
||||||
|
end,
|
||||||
|
cmd = "WhichKey",
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. "whichkey")
|
||||||
|
require("which-key").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local config = require("core.utils").load_config()
|
||||||
|
|
||||||
|
if #config.plugins > 0 then
|
||||||
|
table.insert(default_plugins, { import = config.plugins })
|
||||||
|
end
|
||||||
|
|
||||||
|
require("lazy").setup(default_plugins, config.lazy_nvim)
|
||||||
Reference in New Issue
Block a user