dotfiles/home/.config/nvim/lua/pluginmanager.lua

70 lines
1.6 KiB
Lua
Raw Normal View History

local fn = vim.fn
local cmd = vim.cmd
-- Install packer if it's not yet installed
2021-01-30 16:46:41 +02:00
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
local packer_not_installed = fn.empty(fn.glob(install_path))
if packer_not_installed > 0 then
2021-01-30 16:46:41 +02:00
print('Packer is not installed, cloning it now...')
cmd('silent !git clone https://github.com/wbthomason/packer.nvim ' ..
install_path)
end
-- Configure packer
cmd 'packadd packer.nvim'
local use = require('packer').use
require('packer').startup(function()
2021-01-30 16:46:41 +02:00
-- The plugin manager itself
use {'wbthomason/packer.nvim', opt = true}
2021-01-30 16:46:41 +02:00
-- Colorscheme
use 'joshdick/onedark.vim'
2021-01-30 16:46:41 +02:00
-- Custom status and tabline
use 'vim-airline/vim-airline'
2021-01-30 16:46:41 +02:00
-- Tree explorer
use 'scrooloose/nerdtree'
-- Telescope
2021-02-27 11:48:03 +02:00
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
}
2021-01-30 16:46:41 +02:00
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
2021-08-04 11:58:18 +03:00
-- Read editorconfig settings
use 'editorconfig/editorconfig-vim'
2021-01-30 16:46:41 +02:00
-- Configs for built-in LSP
use 'neovim/nvim-lspconfig'
-- Install LSP executables
use 'kabouzeid/nvim-lspinstall'
2021-08-02 16:55:11 +03:00
2021-01-30 16:46:41 +02:00
-- Completion framework
use 'nvim-lua/completion-nvim'
2021-01-30 16:17:39 +02:00
-- treesitter syntax highlight
use {
'nvim-treesitter/nvim-treesitter',
branch = '0.5-compat',
run = ':TSUpdate'
}
-- Syntax highlighting for languages
-- that are not supported by treesitter
use 'sheerun/vim-polyglot'
2021-01-30 16:46:41 +02:00
-- Formatter plugin
use 'sbdchd/neoformat'
end)
-- Install plugins if packer was not installed
2021-01-30 16:46:41 +02:00
if packer_not_installed > 0 then cmd 'PackerInstall' end