From 64d19effcc7aa1db2f134130484aa68cddd6ecd6 Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Thu, 30 Jun 2022 13:31:26 +0200 Subject: neovim --- Common/nvim/lua/plugins.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Common/nvim/lua/plugins.lua (limited to 'Common/nvim/lua/plugins.lua') 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 | 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 + + -- 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) -- cgit v1.2.3