diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2022-06-30 13:31:26 +0200 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2022-06-30 13:33:05 +0200 |
commit | 64d19effcc7aa1db2f134130484aa68cddd6ecd6 (patch) | |
tree | 5ce1fe1484ecc209ad98371162105b8a34092c13 /Common/nvim/lua/plugins.lua | |
parent | 0447c58e759df165269ffe9182398881e650d923 (diff) | |
download | dotfiles-64d19effcc7aa1db2f134130484aa68cddd6ecd6.tar.gz dotfiles-64d19effcc7aa1db2f134130484aa68cddd6ecd6.zip |
neovim
Diffstat (limited to 'Common/nvim/lua/plugins.lua')
-rw-r--r-- | Common/nvim/lua/plugins.lua | 25 |
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) |