2020-12-14 19:11:20 +02:00
|
|
|
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'
|
2020-12-14 19:11:20 +02:00
|
|
|
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)
|
2020-12-14 19:11:20 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Configure packer
|
|
|
|
cmd 'packadd packer.nvim'
|
2021-02-02 19:06:05 +02:00
|
|
|
local use = require('packer').use
|
2020-12-14 19:11:20 +02:00
|
|
|
require('packer').startup(function()
|
|
|
|
|
2021-01-30 16:46:41 +02:00
|
|
|
-- The plugin manager itself
|
|
|
|
use {'wbthomason/packer.nvim', opt = true}
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-01-30 16:46:41 +02:00
|
|
|
-- Colorscheme
|
|
|
|
use 'joshdick/onedark.vim'
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-01-30 16:46:41 +02:00
|
|
|
-- Custom status and tabline
|
|
|
|
use 'vim-airline/vim-airline'
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-01-30 16:46:41 +02:00
|
|
|
-- Tree explorer
|
|
|
|
use 'scrooloose/nerdtree'
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-08-04 11:42:37 +03:00
|
|
|
-- Telescope
|
2021-02-27 11:48:03 +02:00
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
|
|
|
|
}
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-01-30 16:46:41 +02:00
|
|
|
-- Do stuff as sudo
|
|
|
|
use 'lambdalisue/suda.vim'
|
2020-12-14 19:11:20 +02:00
|
|
|
|
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'
|
2020-12-14 19:11:20 +02:00
|
|
|
|
2021-08-04 11:42:37 +03:00
|
|
|
-- 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
|
|
|
|
2021-08-04 11:42:37 +03:00
|
|
|
-- treesitter syntax highlight
|
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
branch = '0.5-compat',
|
|
|
|
run = ':TSUpdate'
|
|
|
|
}
|
|
|
|
|
2021-08-04 11:58:44 +03:00
|
|
|
-- 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'
|
2021-02-02 19:06:05 +02:00
|
|
|
|
2020-12-14 19:11:20 +02:00
|
|
|
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
|