migrate from packer.nvim to lazy.nvim
This commit is contained in:
parent
518ee0e0c0
commit
e46862c670
|
@ -1,76 +1,73 @@
|
||||||
local ensure_packer = function()
|
-- bootstrap lazy.nvim
|
||||||
local fn = vim.fn
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
vim.fn.system({
|
||||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
"git",
|
||||||
vim.cmd([[packadd packer.nvim]])
|
"clone",
|
||||||
return true
|
"--filter=blob:none",
|
||||||
end
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
return false
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
local packer_bootstrap = ensure_packer()
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
-- plugins go here
|
local plugins = {
|
||||||
return require("packer").startup(function(use)
|
|
||||||
-- the package manager
|
|
||||||
use("wbthomason/packer.nvim")
|
|
||||||
|
|
||||||
-- whats an ide without a file explorer
|
-- whats an ide without a file explorer
|
||||||
use("nvim-tree/nvim-tree.lua")
|
"nvim-tree/nvim-tree.lua",
|
||||||
use("nvim-tree/nvim-web-devicons")
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
|
||||||
-- default bar only looks good on linux
|
-- default bar only looks good on linux
|
||||||
use("nvim-lualine/lualine.nvim")
|
"nvim-lualine/lualine.nvim",
|
||||||
|
|
||||||
-- colorschemes
|
-- colorschemes
|
||||||
use("rebelot/kanagawa.nvim")
|
"rebelot/kanagawa.nvim",
|
||||||
|
|
||||||
-- syntax highlighting apparently
|
-- syntax highlighting apparently
|
||||||
use("nvim-treesitter/nvim-treesitter")
|
"nvim-treesitter/nvim-treesitter",
|
||||||
use("windwp/nvim-ts-autotag")
|
"windwp/nvim-ts-autotag",
|
||||||
|
|
||||||
-- like fzf but goofier
|
-- like fzf but goofier
|
||||||
use({
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.1",
|
version = "0.1.1",
|
||||||
requires = { { "nvim-lua/plenary.nvim" } },
|
dependencies = { { "nvim-lua/plenary.nvim" } },
|
||||||
})
|
},
|
||||||
-- lsp stuff
|
-- lsp stuff
|
||||||
use({
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
})
|
},
|
||||||
-- le completion
|
-- le completion
|
||||||
use("hrsh7th/nvim-cmp")
|
"hrsh7th/nvim-cmp",
|
||||||
use("hrsh7th/cmp-buffer")
|
"hrsh7th/cmp-buffer",
|
||||||
use("hrsh7th/cmp-path")
|
"hrsh7th/cmp-path",
|
||||||
use("hrsh7th/cmp-nvim-lsp")
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
use("onsails/lspkind.nvim")
|
"onsails/lspkind.nvim",
|
||||||
|
|
||||||
-- snippet
|
-- snippet
|
||||||
use("L3MON4D3/LuaSnip")
|
"L3MON4D3/LuaSnip",
|
||||||
use("saadparwaiz1/cmp_luasnip")
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
-- auto close to prevent carpal tunnel :)
|
-- auto close to prevent carpal tunnel :
|
||||||
use("windwp/nvim-autopairs")
|
"windwp/nvim-autopairs",
|
||||||
|
|
||||||
-- git stuff lol
|
-- git stuff lol
|
||||||
use("lewis6991/gitsigns.nvim")
|
"lewis6991/gitsigns.nvim",
|
||||||
|
|
||||||
-- linting
|
-- linting
|
||||||
use("jose-elias-alvarez/null-ls.nvim")
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
use("jayp0521/mason-null-ls.nvim")
|
"jayp0521/mason-null-ls.nvim",
|
||||||
|
|
||||||
-- flex
|
-- flex
|
||||||
use("andweeb/presence.nvim")
|
"andweeb/presence.nvim",
|
||||||
|
|
||||||
-- color picker
|
-- color picker
|
||||||
use ("ziontee113/color-picker.nvim")
|
"ziontee113/color-picker.nvim",
|
||||||
|
}
|
||||||
|
|
||||||
-- auto update just like vscode
|
require("lazy").setup(plugins, {})
|
||||||
if packer_bootstrap then
|
|
||||||
require("packer").sync()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
Loading…
Reference in a new issue