feat(nvim): Use lazy for plugins
- When you run it for the first time it'll add a lock that you should commit
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
require("mimu.packer")
|
||||
require("mimu.plugins")
|
||||
require("mimu.remap")
|
||||
require("mimu.set")
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||
|
||||
-- Only required if you have packer configured as `opt`
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- telescope
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.1',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
-- theme
|
||||
use({
|
||||
'ramojus/mellifluous.nvim',
|
||||
requires = { 'rktjmp/lush.nvim' },
|
||||
config = function()
|
||||
require'mellifluous'.setup({
|
||||
styles = {
|
||||
comments = '',
|
||||
},
|
||||
}) -- optional, see configuration section.
|
||||
vim.cmd('colorscheme mellifluous')
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- treesitter
|
||||
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
|
||||
|
||||
-- nvim-tree
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
requires = {
|
||||
'nvim-tree/nvim-web-devicons', -- optional
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
end
|
||||
}
|
||||
|
||||
-- harpoon
|
||||
use("theprimeagen/harpoon")
|
||||
|
||||
-- undotree
|
||||
use("mbbill/undotree")
|
||||
|
||||
-- git / vim-fugitive
|
||||
use("tpope/vim-fugitive")
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
-- lualine
|
||||
use {'nvim-lualine/lualine.nvim'}
|
||||
|
||||
-- Comment
|
||||
use {'numToStr/Comment.nvim'}
|
||||
|
||||
-- LSP
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v1.x',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
{'williamboman/mason.nvim'}, -- Optional
|
||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
{'hrsh7th/cmp-buffer'}, -- Optional
|
||||
{'hrsh7th/cmp-path'}, -- Optional
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- Optional
|
||||
{'hrsh7th/cmp-nvim-lua'}, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- Required
|
||||
{'rafamadriz/friendly-snippets'}, -- Optional
|
||||
}
|
||||
}
|
||||
end)
|
||||
@@ -0,0 +1,117 @@
|
||||
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)
|
||||
|
||||
return require("lazy").setup({
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.1",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
||||
-- theme
|
||||
{
|
||||
"ramojus/mellifluous.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
dependencies = { "rktjmp/lush.nvim" },
|
||||
config = function()
|
||||
require("mellifluous").setup({
|
||||
styles = {
|
||||
comments = "",
|
||||
},
|
||||
}) -- optional, see configuration section.
|
||||
vim.cmd("colorscheme mellifluous")
|
||||
end,
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
},
|
||||
|
||||
-- nvim-tree
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons", -- optional
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({})
|
||||
end,
|
||||
},
|
||||
|
||||
-- harpoon
|
||||
{
|
||||
"theprimeagen/harpoon",
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- undotree
|
||||
"mbbill/undotree",
|
||||
|
||||
-- git / vim-fugitive
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- lualine
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
-- Comment
|
||||
{ "numToStr/Comment.nvim", event = "BufRead" },
|
||||
|
||||
-- LSP
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v1.x",
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{ "neovim/nvim-lspconfig" }, -- Required
|
||||
{ "williamboman/mason.nvim" }, -- Optional
|
||||
{ "williamboman/mason-lspconfig.nvim" }, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{ "hrsh7th/nvim-cmp" }, -- Required
|
||||
{ "hrsh7th/cmp-nvim-lsp" }, -- Required
|
||||
{ "hrsh7th/cmp-buffer" }, -- Optional
|
||||
{ "hrsh7th/cmp-path" }, -- Optional
|
||||
{ "saadparwaiz1/cmp_luasnip" }, -- Optional
|
||||
{ "hrsh7th/cmp-nvim-lua" }, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{ "L3MON4D3/LuaSnip" }, -- Required
|
||||
{ "rafamadriz/friendly-snippets" }, -- Optional
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user