aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins.lua')
-rw-r--r--lua/plugins.lua63
1 files changed, 49 insertions, 14 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 8ac9044..39d0c8a 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -1,21 +1,56 @@
-local execute = vim.api.nvim_command
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', 'https://github.com/wbthomason/packer.nvim', install_path})
- execute 'packadd packer.nvim'
+ packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
+end
+
+vim.cmd([[
+ augroup packer_user_config
+ autocmd!
+ autocmd BufWritePost plugins.lua source <afile> | PackerSync
+ augroup end
+]])
+
+local status, packer = pcall(require, "packer")
+if not status then
+ return
end
+packer.init {
+ display = {
+ open_fn = function()
+ return require("packer.util").float { border = "rounded" }
+ end,
+ },
+}
+
+return packer.startup(function(use)
+-- Packer
+ use 'wbthomason/packer.nvim'
+
+-- cmp
+ use 'hrsh7th/nvim-cmp'
+ use 'hrsh7th/cmp-nvim-lsp'
+ use 'hrsh7th/cmp-buffer'
+ use 'hrsh7th/cmp-path'
+ use 'hrsh7th/cmp-cmdline'
+
+-- snippets
+ use 'hrsh7th/vim-vsnip'
+ use 'hrsh7th/cmp-vsnip'
+--
+-- LSP
+ use "neovim/nvim-lspconfig"
+ use "williamboman/nvim-lsp-installer"
+
+-- Other
+ use "kyazdani42/nvim-web-devicons"
+ use "kyazdani42/nvim-tree.lua"
+ use "akinsho/bufferline.nvim"
-return require('packer').startup(function(use)
- use 'wbthomason/packer.nvim'
- use "neovim/nvim-lspconfig"
- use "hrsh7th/nvim-compe"
- use 'hrsh7th/vim-vsnip'
- use 'windwp/nvim-autopairs'
- use 'kyazdani42/nvim-web-devicons'
- use "kyazdani42/nvim-tree.lua"
- use { 'akinsho/nvim-bufferline.lua', requires = 'kyazdani42/nvim-web-devicons'}
+ -- 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)