aboutsummaryrefslogtreecommitdiff
path: root/Common/nvim/lua/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Common/nvim/lua/plugins.lua')
-rw-r--r--Common/nvim/lua/plugins.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/Common/nvim/lua/plugins.lua b/Common/nvim/lua/plugins.lua
new file mode 100644
index 0000000..43f63a7
--- /dev/null
+++ b/Common/nvim/lua/plugins.lua
@@ -0,0 +1,25 @@
+-- Autoinstall packer
+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
+ packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
+end
+
+-- Autocompile packer
+vim.cmd([[
+ augroup packer_user_config
+ autocmd!
+ autocmd BufWritePost plugins.lua source <afile> | PackerCompile
+ augroup end
+]])
+
+return require('packer').startup(function(use)
+ use 'neovim/nvim-lspconfig' -- Easy LSP configuration
+ use 'kabouzeid/nvim-lspinstall' -- Install LSP servers on demand with :LSPInstall <name_of_language>
+
+ -- 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)