diff options
| author | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-04 22:21:17 +0100 |
|---|---|---|
| committer | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-04 22:21:17 +0100 |
| commit | 0eb2af20164f3281b9981386d7ac03713e2f3e01 (patch) | |
| tree | 6b2a0fd12382987b4265ac178b26ea5386e67759 /lua/plugins.lua | |
| parent | e1b0a35e04546333634c3ceb6ed84cb21ef90c38 (diff) | |
New begining
Diffstat (limited to 'lua/plugins.lua')
| -rw-r--r-- | lua/plugins.lua | 63 |
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) |
