2021-08-08 15:33:23 +03:00
|
|
|
local fn = vim.fn
|
|
|
|
local cmd = vim.cmd
|
|
|
|
|
|
|
|
-- Install packer if it's not yet installed
|
|
|
|
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
|
|
|
|
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()
|
|
|
|
|
|
|
|
-- The plugin manager itself
|
|
|
|
use {'wbthomason/packer.nvim', opt = true}
|
|
|
|
|
|
|
|
-- Colorscheme
|
2021-08-18 21:20:20 +03:00
|
|
|
use 'EdenEast/nightfox.nvim'
|
2021-08-08 15:33:23 +03:00
|
|
|
|
2021-08-18 09:29:44 +03:00
|
|
|
-- Git in signcolumn
|
|
|
|
use 'airblade/vim-gitgutter'
|
|
|
|
|
2021-08-08 15:33:23 +03:00
|
|
|
-- Statusline
|
|
|
|
use {
|
|
|
|
'hoob3rt/lualine.nvim',
|
|
|
|
requires = {'kyazdani42/nvim-web-devicons', opt = true}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Tabline/bufferline
|
|
|
|
use {
|
|
|
|
'akinsho/nvim-bufferline.lua',
|
|
|
|
requires = 'kyazdani42/nvim-web-devicons'
|
|
|
|
}
|
|
|
|
|
2021-08-18 14:17:19 +03:00
|
|
|
-- Git commands
|
|
|
|
use 'tpope/vim-fugitive'
|
|
|
|
|
2021-08-08 15:33:23 +03:00
|
|
|
-- Indent characters
|
2021-08-18 21:20:20 +03:00
|
|
|
-- use "lukas-reineke/indent-blankline.nvim"
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Tree explorer
|
|
|
|
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
|
|
|
|
|
|
|
|
-- Telescope
|
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Do stuff as sudo
|
|
|
|
use 'lambdalisue/suda.vim'
|
|
|
|
|
|
|
|
-- Read editorconfig settings
|
|
|
|
use 'editorconfig/editorconfig-vim'
|
|
|
|
|
|
|
|
-- Configs for built-in LSP
|
|
|
|
use 'neovim/nvim-lspconfig'
|
|
|
|
|
|
|
|
-- Install LSP executables
|
|
|
|
use 'kabouzeid/nvim-lspinstall'
|
|
|
|
|
|
|
|
-- Completion framework
|
|
|
|
use 'nvim-lua/completion-nvim'
|
|
|
|
|
|
|
|
-- treesitter syntax highlight
|
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
branch = '0.5-compat',
|
|
|
|
run = ':TSUpdate'
|
|
|
|
}
|
|
|
|
|
2021-08-18 21:20:20 +03:00
|
|
|
-- treesitter plugin for commentstring
|
|
|
|
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
|
|
|
|
|
|
|
-- Additional plugins for formats not supported
|
|
|
|
-- by treesitter
|
|
|
|
use 'jamespeapen/swayconfig.vim'
|
|
|
|
|
|
|
|
-- mappings for commenting in code
|
|
|
|
use 'tpope/vim-commentary'
|
|
|
|
|
|
|
|
-- we all know this one
|
|
|
|
use 'tpope/vim-surround'
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Formatter plugin
|
|
|
|
use 'sbdchd/neoformat'
|
|
|
|
|
|
|
|
-- Make editing passwords safer
|
|
|
|
use {
|
|
|
|
'https://git.zx2c4.com/password-store',
|
|
|
|
rtp = 'contrib/vim/redact_pass.vim'
|
|
|
|
}
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- Install plugins if packer was not installed
|
|
|
|
if packer_not_installed > 0 then cmd 'PackerInstall' end
|