Skip to content

Commit

Permalink
Migrate to lazy.nvim package manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonllera committed May 7, 2024
1 parent 137e94f commit 2627ea5
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 82 deletions.
45 changes: 45 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" },
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" },
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "b603990a639bb4b8651d054ef8d5a8fe5db56e0c" },
"friendly-snippets": { "branch": "main", "commit": "fa36367422da5a38560892e3db6d090a635d9d41" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lsp_signature.nvim": { "branch": "master", "commit": "c6aeb2f1d2538bbdfdaab1664d9d4c3c75aa9db8" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "05744f0f1967b5757bd05c08df4271ab8ec990aa" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"material.nvim": { "branch": "main", "commit": "772e41a7f33743224f30799a3a887dc7dd853f8d" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
"nvim-lspconfig": { "branch": "master", "commit": "9a5a3ebd63b0bf7f8528ed2ca65c8c8bcd2bbeae" },
"nvim-tree.lua": { "branch": "master", "commit": "64f61e4c913047a045ff90bd188dd3b54ee443cf" },
"nvim-treesitter": { "branch": "master", "commit": "da0efd7398713a3177da5ce8690f0e5c5415763d" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"python-type-stubs": { "branch": "main", "commit": "2e0624116ea217a06c29a7e84f96a78b9db1d2b2" },
"tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "fac83a556e7b710dc31433dec727361ca062dbe9" },
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"vim-black": { "branch": "main", "commit": "e9486a54b63939da162cbbd4f9838f7319842910" },
"vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" },
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
"vim-fugitive": { "branch": "master", "commit": "ce882460cf3db12e99f8bf579cbf99e331f6dd4f" },
"vim-kitty": { "branch": "main", "commit": "4f3f2901717320f80a1e16a868f706762be8535b" },
"vim-python-indent-black": { "branch": "main", "commit": "8a08f503f4e501441ad6f478d66fa895bf8cf857" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startify": { "branch": "master", "commit": "4e089dffdad46f3f5593f34362d530e8fe823dcf" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-toml": { "branch": "main", "commit": "d36caa6b1cf508a4df1c691f915572fc02143258" },
"vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" },
"vimtex": { "branch": "master", "commit": "5732cd898cc7027e58191fe4be64da8dbc158995" }
}
158 changes: 76 additions & 82 deletions lua/plugins.lua
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
-- Plugin definition and loading
-- local execute = vim.api.nvim_command
local fn = vim.fn
local cmd = vim.cmd

-- Boostrap Packer
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
local packer_bootstrap
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git', 'clone','https://github.com/wbthomason/packer.nvim', install_path})
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)

-- Load Packer
cmd([[packadd packer.nvim]])

-- Rerun PackerCompile everytime pluggins.lua is updated
cmd([[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
augroup end
]])
local plugins = {
-- Themes
{
"folke/tokyonight.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
vim.cmd([[colorscheme tokyonight]])
end,
},

-- Initialize pluggins
return require('packer').startup(function(use)
-- Let Packer manage itself
use({'wbthomason/packer.nvim', opt = true})
{ 'marko-cerovac/material.nvim' },

-- LSP management (must come first as per mason-lspconfig.nvim's instructions)
use {
{
"williamboman/mason.nvim",
run = ":MasonUpdate",
}-- :MasonUpdate updates registry contents
build = ':MasonUpdate',
},

use "williamboman/mason-lspconfig.nvim"
use "neovim/nvim-lspconfig"
{ "williamboman/mason-lspconfig.nvim" },
{ "neovim/nvim-lspconfig" },

require("plugins.lspconfig")
-- require("plugins.lspconfig")

-- Autocomplete
use({
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
-- Sources for nvim-cmp
requires = {
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
Expand All @@ -50,103 +50,103 @@ return require('packer').startup(function(use)
"saadparwaiz1/cmp_luasnip",
},
config = function() require('plugins.cmp') end,
})
},

-- Treesitter
use({
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
config = function() require('plugins.treesitter') end,
run = ':TSUpdate'
})
build = ':TSUpdate'
},

-- Snippets
use {"L3MON4D3/LuaSnip", config = function() require('plugins.snippets') end}
use "rafamadriz/friendly-snippets"
{"L3MON4D3/LuaSnip", config = function() require('plugins.snippets') end},
{"rafamadriz/friendly-snippets"},

-- Signature help
use "ray-x/lsp_signature.nvim"
{"ray-x/lsp_signature.nvim"},

-- Telescope
use({
{
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}},
config = function() require('plugins.telescope') end,
})
},

use({'nvim-telescope/telescope-fzf-native.nvim', run ='make'})
{'nvim-telescope/telescope-fzf-native.nvim', build ='make'},

-- bufferline
use({
{
'akinsho/bufferline.nvim',
requires = 'kyazdani42/nvim-web-devicons',
dependencies = 'kyazdani42/nvim-web-devicons',
config = function() require('plugins.bufferline') end,
event = 'BufWinEnter',
})
},

-- statusline
use({
{
'hoob3rt/lualine.nvim',
config = function() require('plugins.lualine') end,
})
},

-- NvimTree
use({
{
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
dependencies = 'kyazdani42/nvim-web-devicons',
config = function() require('plugins.nvimtree') end, -- Must add this manually
})
},

-- Startify
use({
{
'mhinz/vim-startify',
config = function()
local path = vim.fn.stdpath('config')..'/lua/plugins/startify.vim'
vim.cmd('source '..path)
end
})
},

use 'folke/trouble.nvim'
{'folke/trouble.nvim'},

-- git commands
use 'tpope/vim-fugitive'
{'tpope/vim-fugitive'},

-- Gitsigns
use ({
{
'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'},
dependencies = {'nvim-lua/plenary.nvim'},
config = function() require('plugins.gitsigns') end
})
},

-- Formatting
use 'tpope/vim-commentary'
use 'tpope/vim-unimpaired'
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
use 'junegunn/vim-easy-align'
{ 'tpope/vim-commentary' },
{ 'tpope/vim-unimpaired' },
{ 'tpope/vim-surround' },
{ 'tpope/vim-repeat' },
{ 'junegunn/vim-easy-align' },

-- Copilot
use "github/copilot.vim"
{ "github/copilot.vim" },

-- Python formatting
use "EgZvor/vim-black"
use 'jeetsukumaran/vim-python-indent-black'
{ "EgZvor/vim-black" },
{ 'jeetsukumaran/vim-python-indent-black' },

-- Python types
use "microsoft/python-type-stubs"
{ "microsoft/python-type-stubs" },

-- Python
-- use 'heavenshell/vim-pydocstring' -- Overwrites a keymap, need to fix.
-- use 'bfredl/nvim-ipy'

-- Markdown
use 'godlygeek/tabular'
use 'ellisonleao/glow.nvim'
{ 'godlygeek/tabular' },
{ 'ellisonleao/glow.nvim' },

-- LaTex
use 'lervag/vimtex'
{ 'lervag/vimtex' },

-- TOML Files
use 'cespare/vim-toml'
{ 'cespare/vim-toml' },

-- Poetry
-- use({'petobens/poet-v',
Expand All @@ -157,18 +157,12 @@ return require('packer').startup(function(use)
-- })

-- kitty config syntax-highlight
use "fladson/vim-kitty"
{ "fladson/vim-kitty" },

-- note taking with zettelkasten

-- Themes
use 'folke/tokyonight.nvim'
use 'marko-cerovac/material.nvim'

-- useless plugin
use 'eandrju/cellular-automaton.nvim'
{ 'eandrju/cellular-automaton.nvim' }
}

if packer_bootstrap then
require('packer').sync()
end
end)
require('lazy').setup(plugins)

0 comments on commit 2627ea5

Please sign in to comment.