[feat] Lazy load all plugins
This commit is contained in:
@@ -46,8 +46,8 @@ local normal_mode_maps = {
|
||||
|
||||
{ key = '<leader>rd', map = [[<cmd>RustDebuggables<cr>]] },
|
||||
{ key = '<leader>rr', map = [[<cmd>RustRunnables<cr>]] },
|
||||
{ key = 'Vff', map = [[<cmd>vertical Gdiffsplit<cr>]] },
|
||||
{ key = 'Vff!', map = [[<cmd>vertical Gdiffsplit!<cr>]] },
|
||||
{ key = 'vff', map = [[<cmd>vertical Gdiffsplit<cr>]] },
|
||||
{ key = 'vff!', map = [[<cmd>vertical Gdiffsplit!<cr>]] },
|
||||
{ key = 'ssr', map = [[<cmd>lua require'rust-tools'.ssr.ssr(query)<cr>]] },
|
||||
|
||||
-- Session
|
||||
@@ -67,7 +67,8 @@ local normal_mode_maps = {
|
||||
{ key = 'F', map = [[<cmd>lua vim.lsp.buf.format { async = true }<cr>]] },
|
||||
{ key = 'T', map = [[<cmd>lua require'lsp_extensions'.inlay_hints()<cr>]] },
|
||||
|
||||
-- { key = '<C-W-%>', map = [[<cmd>vsplit<cr>]] },
|
||||
{ key = '<C-W>%', map = [[<cmd>vsplit<cr>]] },
|
||||
{ key = '<C-l>', map = [[<cmd>:SymbolsOutline<cr>]] },
|
||||
|
||||
-- Other
|
||||
{ key = '<leader>m', map = [[<cmd>silent !mpcfzf<cr>]] },
|
||||
|
||||
@@ -7,14 +7,14 @@ require 'lsp.clangd'
|
||||
require 'lspconfig'.tsserver.setup {}
|
||||
require 'lspconfig'.pyright.setup {}
|
||||
require 'lspconfig'.sqlls.setup {}
|
||||
require 'lspconfig'.jsonls.setup {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
-- require 'lspconfig'.jsonls.setup {
|
||||
-- settings = {
|
||||
-- json = {
|
||||
-- schemas = require('schemastore').json.schemas(),
|
||||
-- validate = { enable = true },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
-- vim.o.completeopt= "menuone,noinsert,noselect"
|
||||
|
||||
@@ -19,165 +19,191 @@ vim.opt.rtp:prepend(lazypath)
|
||||
-- local use = require('packer').use
|
||||
|
||||
return require('lazy').setup({
|
||||
'ellisonleao/glow.nvim',
|
||||
'samoshkin/vim-mergetool',
|
||||
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
|
||||
'samoshkin/vim-mergetool',
|
||||
'mhartington/formatter.nvim',
|
||||
-- 'christianrondeau/vim-base64',
|
||||
|
||||
'mhartington/formatter.nvim',
|
||||
'christianrondeau/vim-base64',
|
||||
|
||||
'tpope/vim-commentary',
|
||||
'tpope/vim-fugitive',
|
||||
'tpope/vim-repeat',
|
||||
'tpope/vim-speeddating',
|
||||
'tpope/vim-surround',
|
||||
'tpope/vim-vinegar',
|
||||
'tpope/vim-abolish',
|
||||
|
||||
'yuttie/comfortable-motion.vim',
|
||||
'ruanyl/vim-gh-line',
|
||||
'rest-nvim/rest.nvim',
|
||||
'b0o/SchemaStore.nvim',
|
||||
'rcarriga/nvim-notify',
|
||||
'folke/todo-comments.nvim',
|
||||
'github/copilot.vim',
|
||||
'ggandor/leap.nvim',
|
||||
{ 'shortcuts/no-neck-pain.nvim', version = "*" },
|
||||
{ 'folke/zen-mode.nvim', config = function() require('zen-mode').setup() end },
|
||||
{ 'folke/twilight.nvim', config = function() require('twilight').setup() end },
|
||||
{ 'pwntester/octo.nvim', config = function() require('octo').setup() end },
|
||||
|
||||
{
|
||||
'utilyre/barbecue.nvim',
|
||||
version = "*",
|
||||
config = function() require('barbecue').setup() end,
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
'tpope/vim-commentary',
|
||||
'tpope/vim-fugitive',
|
||||
'tpope/vim-repeat',
|
||||
'tpope/vim-speeddating',
|
||||
'tpope/vim-surround',
|
||||
'tpope/vim-vinegar',
|
||||
'tpope/vim-abolish',
|
||||
{ 'yuttie/comfortable-motion.vim', lazy = false },
|
||||
-- 'ruanyl/vim-gh-line',
|
||||
'rest-nvim/rest.nvim',
|
||||
-- 'b0o/SchemaStore.nvim',
|
||||
-- 'rcarriga/nvim-notify',
|
||||
'folke/todo-comments.nvim',
|
||||
{ 'github/copilot.vim', event = "LspAttach" },
|
||||
-- 'ggandor/leap.nvim',
|
||||
{ 'shortcuts/no-neck-pain.nvim', version = "*" },
|
||||
-- { 'folke/zen-mode.nvim', config = function() require('zen-mode').setup() end },
|
||||
-- { 'folke/twilight.nvim', config = function() require('twilight').setup() end },
|
||||
{
|
||||
'pwntester/octo.nvim', cmd = "Octo",
|
||||
config = function()
|
||||
require(
|
||||
'octo').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
'sainnhe/sonokai',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require(
|
||||
'colorscheme')
|
||||
end
|
||||
},
|
||||
{ 'folke/which-key.nvim', config = function() require("which-key").setup() end },
|
||||
{ 'nvim-telescope/telescope.nvim',
|
||||
cmd = "Telescope",
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-ui-select.nvim', 'nvim-telescope/telescope-fzf-native.nvim' }
|
||||
},
|
||||
{
|
||||
'utilyre/barbecue.nvim',
|
||||
version = "*",
|
||||
config = function() require('barbecue').setup() end,
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
|
||||
{ 'akinsho/git-conflict.nvim',
|
||||
version = "*",
|
||||
config = function()
|
||||
require('git-conflict').setup()
|
||||
end
|
||||
},
|
||||
|
||||
{ 'williamboman/mason.nvim',
|
||||
config = function()
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer" },
|
||||
automatic_installation = true,
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
'NTBBloodbath/galaxyline.nvim', branch = 'main',
|
||||
config = function() require('statusline') end,
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
},
|
||||
{ 'sainnhe/sonokai', config = function() require('colorscheme') end },
|
||||
{ 'folke/which-key.nvim', config = function() require("which-key").setup() end },
|
||||
{ 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' } },
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
-- build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build',
|
||||
build = 'make',
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
initial_mode = 'insert',
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
}
|
||||
},
|
||||
{
|
||||
'akinsho/git-conflict.nvim',
|
||||
version = "*",
|
||||
config = function()
|
||||
require('git-conflict').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
cmd = { "Mason", "MasonInstall", "MasonUpdate", "MasonUninstall" },
|
||||
config = function()
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
require('telescope').load_extension('fzf')
|
||||
end,
|
||||
},
|
||||
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
{ 'norcalli/nvim-colorizer.lua', config = function() require 'colorizer'.setup() end, },
|
||||
|
||||
-- lsp
|
||||
-- use { 'onsails/lspkind-nvim', config = function() require'lspkind'.init() end, }
|
||||
{
|
||||
'folke/trouble.nvim',
|
||||
config = function()
|
||||
-- local actions = require("telescope.actions")
|
||||
require("trouble").setup()
|
||||
local trouble = require("trouble.providers.telescope")
|
||||
local telescope = require("telescope")
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{ 'neovim/nvim-lspconfig', config = function() require("lsp") end, },
|
||||
{ 'nvim-lua/lsp-status.nvim' },
|
||||
{ 'ray-x/lsp_signature.nvim' },
|
||||
{ 'terrastruct/d2-vim' },
|
||||
{
|
||||
'andweeb/presence.nvim',
|
||||
config = function()
|
||||
require "presence".setup({
|
||||
auto_update = true,
|
||||
main_image = "file",
|
||||
})
|
||||
end },
|
||||
|
||||
{ 'ms-jpq/coq_nvim', dependencies = { 'ms-jpq/coq.artifacts' }, build = ':COQdeps',
|
||||
config = function()
|
||||
-- require("coq")
|
||||
vim.g.coq_settings.keymap = { jump_to_mark = "<c-j>" }
|
||||
end
|
||||
},
|
||||
{ 'jose-elias-alvarez/null-ls.nvim', config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
null_ls.builtins.completion.spell,
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer" },
|
||||
automatic_installation = true,
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
'NTBBloodbath/galaxyline.nvim', branch = 'main',
|
||||
lazy = false,
|
||||
config = function() require('statusline') end,
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
-- build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build',
|
||||
build = 'make',
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
initial_mode = 'insert',
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
}
|
||||
}
|
||||
}
|
||||
require('telescope').load_extension('fzf')
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
},
|
||||
{ 'norcalli/nvim-colorizer.lua', config = function() require 'colorizer'.setup() end, },
|
||||
-- lsp
|
||||
-- use { 'onsails/lspkind-nvim', config = function() require'lspkind'.init() end, }
|
||||
{
|
||||
'folke/trouble.nvim',
|
||||
cmd = {
|
||||
"Trouble",
|
||||
"TroubleClose",
|
||||
"TroubleToggle",
|
||||
"TroubleRefresh",
|
||||
},
|
||||
config = function()
|
||||
-- local actions = require("telescope.actions")
|
||||
require("trouble").setup()
|
||||
local trouble = require("trouble.providers.telescope")
|
||||
local telescope = require("telescope")
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{ 'neovim/nvim-lspconfig',
|
||||
ft = { "rust", "toml", "lua" },
|
||||
config = function()
|
||||
require(
|
||||
"lsp")
|
||||
end, },
|
||||
{
|
||||
'nvim-lua/lsp-status.nvim',
|
||||
event = "LspAttach"
|
||||
},
|
||||
{
|
||||
'ray-x/lsp_signature.nvim',
|
||||
event = "LspAttach",
|
||||
config = function()
|
||||
require("lsp_signature").setup({
|
||||
floating_window_above_cur_line = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'terrastruct/d2-vim',
|
||||
ft = "d2",
|
||||
},
|
||||
{
|
||||
'andweeb/presence.nvim',
|
||||
config = function()
|
||||
require "presence".setup({
|
||||
auto_update = true,
|
||||
main_image = "file",
|
||||
})
|
||||
end },
|
||||
|
||||
{ 'ms-jpq/chadtree', build = ':CHADdeps' },
|
||||
{ 'ms-jpq/coq.thirdparty', config = function()
|
||||
{
|
||||
'ms-jpq/coq_nvim',
|
||||
ft = { "rust", "toml", "lua" },
|
||||
dependencies = { 'ms-jpq/coq.artifacts', 'ms-jpq/coq.thirdparty' },
|
||||
build = ':COQdeps',
|
||||
config = function()
|
||||
vim.g.coq_settings.keymap = { jump_to_mark = "<c-j>" }
|
||||
end
|
||||
},
|
||||
-- { 'ms-jpq/chadtree', build = ':CHADdeps' },
|
||||
{ 'ms-jpq/coq.thirdparty',
|
||||
config = function()
|
||||
require("coq_3p")({
|
||||
{
|
||||
src = "repl",
|
||||
@@ -192,81 +218,101 @@ return require('lazy').setup({
|
||||
{ src = "dap" }
|
||||
})
|
||||
end
|
||||
},
|
||||
},
|
||||
-- use 'airblade/vim-rooter'
|
||||
-- use({
|
||||
-- "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
-- config = function()
|
||||
-- require("lsp_lines").setup()
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- use 'airblade/vim-rooter'
|
||||
-- use({
|
||||
-- "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
-- config = function()
|
||||
-- require("lsp_lines").setup()
|
||||
-- end,
|
||||
-- })
|
||||
{
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
config = function()
|
||||
require("indent_blankline").setup {
|
||||
show_end_of_line = true,
|
||||
}
|
||||
end
|
||||
},
|
||||
{ 'sindrets/diffview.nvim', cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles", "DiffviewRefresh" }, dependencies = 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
cmd = "ToggleTerm",
|
||||
config = function() require 'setup.toggleterm' end,
|
||||
},
|
||||
-- {
|
||||
-- 'glepnir/dashboard-nvim',
|
||||
-- config = function() require 'setup.dashboard' end,
|
||||
-- },
|
||||
|
||||
{
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
config = function()
|
||||
require("indent_blankline").setup {
|
||||
show_end_of_line = true,
|
||||
}
|
||||
end
|
||||
},
|
||||
|
||||
{ 'sindrets/diffview.nvim', dependencies = 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
config = function() require 'setup.toggleterm' end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- 'glepnir/dashboard-nvim',
|
||||
-- config = function() require 'setup.dashboard' end,
|
||||
-- },
|
||||
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate'
|
||||
},
|
||||
{
|
||||
'LhKipp/nvim-nu',
|
||||
dependencies = { 'jose-elias-alvarez/null-ls.nvim' },
|
||||
config = function() require('nu').setup {} end,
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' }
|
||||
},
|
||||
|
||||
-- {
|
||||
-- 'saecki/crates.nvim',
|
||||
-- tag = 'v0.2.1',
|
||||
-- dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
-- config = function()
|
||||
-- require('crates').setup {
|
||||
-- src = {
|
||||
-- coq = {
|
||||
-- enabled = true,
|
||||
-- name = "crates.nvim",
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
{ 'simrat39/rust-tools.nvim', config = function() require 'setup.rust-tools' end },
|
||||
|
||||
|
||||
{
|
||||
"rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" },
|
||||
config = function() require("dapui").setup() end
|
||||
},
|
||||
|
||||
{
|
||||
'phaazon/hop.nvim',
|
||||
branch = 'v2', -- optional but strongly recommended
|
||||
config = function()
|
||||
-- you can configure Hop the way you like here; see :h hop-config
|
||||
require 'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
|
||||
end
|
||||
},
|
||||
|
||||
});
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate'
|
||||
},
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' }
|
||||
},
|
||||
-- {
|
||||
-- 'saecki/crates.nvim',
|
||||
-- tag = 'v0.2.1',
|
||||
-- dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
-- config = function()
|
||||
-- require('crates').setup {
|
||||
-- src = {
|
||||
-- coq = {
|
||||
-- enabled = true,
|
||||
-- name = "crates.nvim",
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
{ 'simrat39/rust-tools.nvim', ft = 'rust', config = function()
|
||||
require 'setup.rust-tools'
|
||||
end, dependencies = "ms-jpq/coq_nvim" },
|
||||
{
|
||||
"rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" },
|
||||
config = function() require("dapui").setup() end
|
||||
},
|
||||
-- {
|
||||
-- 'phaazon/hop.nvim',
|
||||
-- branch = 'v2', -- optional but strongly recommended
|
||||
-- config = function()
|
||||
-- -- you can configure Hop the way you like here; see :h hop-config
|
||||
-- require 'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
|
||||
-- end
|
||||
-- },
|
||||
-- https://github.com/simrat39/symbols-outline.nvim
|
||||
{
|
||||
'simrat39/symbols-outline.nvim',
|
||||
cmd = "SymbolsOutline",
|
||||
config = function()
|
||||
require('symbols-outline').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"glepnir/lspsaga.nvim",
|
||||
event = "LspAttach",
|
||||
config = function()
|
||||
require("lspsaga").setup({})
|
||||
end,
|
||||
dependencies = {
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
--Please make sure you install markdown and markdown_inline parser
|
||||
{ "nvim-treesitter/nvim-treesitter" }
|
||||
}
|
||||
},
|
||||
{
|
||||
'j-hui/fidget.nvim',
|
||||
event = "LspAttach",
|
||||
config = function()
|
||||
require("fidget").setup({})
|
||||
end
|
||||
}
|
||||
}, {
|
||||
defaults = {
|
||||
lazy = true,
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user