summaryrefslogtreecommitdiff
path: root/lua/core/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core/plugins.lua')
-rw-r--r--lua/core/plugins.lua60
1 files changed, 27 insertions, 33 deletions
diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua
index 7d8c3c1..3fcbdec 100644
--- a/lua/core/plugins.lua
+++ b/lua/core/plugins.lua
@@ -1,38 +1,38 @@
-local ensure_packer = function()
- local fn = vim.fn
- local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
- if fn.empty(fn.glob(install_path)) > 0 then
- fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
- vim.cmd [[packadd packer.nvim]]
- return true
- end
- return false
+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)
-local packer_bootstrap = ensure_packer()
-
-return require('packer').startup(function(use)
- use 'wbthomason/packer.nvim'
+require("lazy").setup({
+ 'wbthomason/packer.nvim',
-- Telescope and deps
- use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
- use 'nvim-telescope/telescope-symbols.nvim'
- use {
- 'nvim-telescope/telescope.nvim', tag = '0.1.5',
- requires = { {'nvim-lua/plenary.nvim'} }
- }
+ { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
+ 'nvim-telescope/telescope-symbols.nvim',
+ {
+ 'nvim-telescope/telescope.nvim', version = '0.1.5',
+ dependencies = { {'nvim-lua/plenary.nvim'} }
+ },
-- color scheme
- use({ 'rose-pine/neovim', as = 'rose-pine' })
+ { 'rose-pine/neovim', name = 'rose-pine' },
-- visual undo
- use 'mbbill/undotree'
+ 'mbbill/undotree',
-- lsp
- use {
+ {
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
- requires = {
+ dependencies = {
--- Uncomment these if you want to manage LSP servers from neovim
-- {'williamboman/mason.nvim'},
-- {'williamboman/mason-lspconfig.nvim'},
@@ -44,16 +44,10 @@ return require('packer').startup(function(use)
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
- }
+ },
- use {
+ {
'nvim-lualine/lualine.nvim',
- requires = { 'nvim-tree/nvim-web-devicons', opt = true }
+ dependencies = { 'nvim-tree/nvim-web-devicons', lazy = true }
}
-
- -- Automatically set up your configuration after cloning packer.nvim
- -- Put this at the end after all plugins
- if packer_bootstrap then
- require('packer').sync()
- end
-end)
+})