nvim: packer -> lazy
This commit is contained in:
@ -1,10 +1,4 @@
|
||||
_G.load = function(file)
|
||||
require("plenary.reload").reload_module(file, true)
|
||||
return require(file)
|
||||
end
|
||||
|
||||
require("plugins")
|
||||
load("options")
|
||||
load("mappings")
|
||||
load("disablebuiltin")
|
||||
load("colors")
|
||||
require("options")
|
||||
require("mappings")
|
||||
require("colors")
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
local disabled_built_ins = {
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"gzip",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"2html_plugin",
|
||||
"logipat",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"matchit",
|
||||
}
|
||||
|
||||
for _, plugin in pairs(disabled_built_ins) do
|
||||
vim.g["loaded_" .. plugin] = 1
|
||||
end
|
||||
@ -86,34 +86,34 @@ vim.keymap.set("n", "]d", function()
|
||||
end)
|
||||
|
||||
-- neotest
|
||||
vim.keymap.set("n", "na", function()
|
||||
vim.keymap.set("n", "<leader>na", function()
|
||||
require("neotest").run.attach()
|
||||
end)
|
||||
vim.keymap.set("n", "nf", function()
|
||||
vim.keymap.set("n", "<leader>nf", function()
|
||||
require("neotest").run.run(vim.fn.expand("%"))
|
||||
end)
|
||||
vim.keymap.set("n", "nF", function()
|
||||
vim.keymap.set("n", "<leader>nF", function()
|
||||
require("neotest").run.run({ vim.fn.expand("%"), strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "nl", function()
|
||||
vim.keymap.set("n", "<leader>nl", function()
|
||||
require("neotest").run.run_last()
|
||||
end)
|
||||
vim.keymap.set("n", "nL", function()
|
||||
vim.keymap.set("n", "<leader>nL", function()
|
||||
require("neotest").run.run_last({ strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "nn", function()
|
||||
vim.keymap.set("n", "<leader>nn", function()
|
||||
require("neotest").run.run()
|
||||
end)
|
||||
vim.keymap.set("n", "nN", function()
|
||||
vim.keymap.set("n", "<leader>nN", function()
|
||||
require("neotest").run.run({ strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "no", function()
|
||||
vim.keymap.set("n", "<leader>no", function()
|
||||
require("neotest").output.open({ enter = true })
|
||||
end)
|
||||
vim.keymap.set("n", "nS", function()
|
||||
vim.keymap.set("n", "<leader>nS", function()
|
||||
require("neotest").run.stop()
|
||||
end)
|
||||
vim.keymap.set("n", "ns", function()
|
||||
vim.keymap.set("n", "<leader>ns", function()
|
||||
require("neotest").summary.toggle()
|
||||
end)
|
||||
|
||||
|
||||
@ -1,191 +1,184 @@
|
||||
require("packer").startup(function()
|
||||
use("wbthomason/packer.nvim")
|
||||
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("lazy").setup({
|
||||
|
||||
--
|
||||
-- dev
|
||||
--
|
||||
|
||||
-- lspconfig
|
||||
use({
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("plugins.lsp")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- nvim lint
|
||||
use({
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
config = function()
|
||||
require("plugins.lint")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- cmp
|
||||
use({
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
require("plugins.cmp")
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-vsnip",
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-buffer",
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-path",
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
})
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-vsnip",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
},
|
||||
},
|
||||
|
||||
-- snippets
|
||||
use({
|
||||
{
|
||||
"hrsh7th/vim-vsnip",
|
||||
config = function()
|
||||
require("plugins.vsnip")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
use({
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
})
|
||||
},
|
||||
|
||||
-- autopairs
|
||||
use({
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("plugins.autopairs")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
use({
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("plugins.treesitter")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
use({
|
||||
{
|
||||
"RRethy/nvim-treesitter-textsubjects",
|
||||
config = function()
|
||||
require("plugins.treesitter-textobjects")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- formatter
|
||||
use({
|
||||
{
|
||||
"mhartington/formatter.nvim",
|
||||
cmd = { "Format", "FormatWrite" },
|
||||
config = function()
|
||||
require("plugins.formatter")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- toggleterm
|
||||
use({
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
cmd = "ToggleTerm*",
|
||||
cmd = "ToggleTerm",
|
||||
config = function()
|
||||
require("plugins.toggleterm")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- comment.nvim
|
||||
use({
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require("plugins.comment")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- neotest
|
||||
use({
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
config = function()
|
||||
require("plugins.neotest")
|
||||
end,
|
||||
requires = {
|
||||
dependencies = {
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
-- fugitive
|
||||
use({
|
||||
"tpope/vim-fugitive",
|
||||
})
|
||||
"tpope/vim-fugitive",
|
||||
|
||||
--
|
||||
-- files (and more)
|
||||
--
|
||||
|
||||
-- telescope
|
||||
use({
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("plugins.telescope")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
-- nvim tree
|
||||
use({
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("plugins.nvim-tree")
|
||||
end,
|
||||
})
|
||||
dependencies = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
},
|
||||
|
||||
--
|
||||
-- looks
|
||||
--
|
||||
|
||||
-- lualine
|
||||
use({
|
||||
{
|
||||
"hoob3rt/lualine.nvim",
|
||||
config = function()
|
||||
require("plugins.lualine")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
--
|
||||
-- colorscheme
|
||||
--
|
||||
|
||||
use({
|
||||
"crusoexia/vim-monokai",
|
||||
})
|
||||
|
||||
use({
|
||||
"dylanaraps/wal.vim",
|
||||
})
|
||||
"crusoexia/vim-monokai",
|
||||
"dylanaraps/wal.vim",
|
||||
|
||||
--
|
||||
-- telekasten
|
||||
--
|
||||
|
||||
use({
|
||||
{
|
||||
"renerocksai/telekasten.nvim",
|
||||
requires = "telescope.nvim",
|
||||
dependencies = "telescope.nvim",
|
||||
config = function()
|
||||
require("plugins.telekasten")
|
||||
end,
|
||||
})
|
||||
},
|
||||
|
||||
use({
|
||||
"renerocksai/calendar-vim",
|
||||
})
|
||||
end)
|
||||
"renerocksai/calendar-vim",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user