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
|
2022-08-14 20:36:32 +03:00
|
|
|
use({'catppuccin/nvim', as = 'catppuccin'})
|
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',
|
2022-08-14 20:36:32 +03:00
|
|
|
tag = '*',
|
2021-08-08 15:33:23 +03:00
|
|
|
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
|
2022-08-14 20:36:32 +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'}
|
|
|
|
|
2022-03-02 18:00:05 +02:00
|
|
|
-- Telescope
|
2022-03-02 17:50:32 +02:00
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
requires = {{'nvim-lua/plenary.nvim'}}
|
|
|
|
}
|
2022-03-02 18:00:05 +02:00
|
|
|
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} -- Use fzf for fuzzy finder
|
|
|
|
use {'nvim-telescope/telescope-ui-select.nvim'} -- Replace vim built in select with telescope
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Do stuff as sudo
|
|
|
|
use 'lambdalisue/suda.vim'
|
|
|
|
|
|
|
|
-- Read editorconfig settings
|
|
|
|
use 'editorconfig/editorconfig-vim'
|
|
|
|
|
|
|
|
-- Configs for built-in LSP
|
|
|
|
use 'neovim/nvim-lspconfig'
|
|
|
|
|
2021-11-26 18:19:36 +02:00
|
|
|
-- Install LSP server executables
|
|
|
|
use 'williamboman/nvim-lsp-installer'
|
2021-08-08 15:33:23 +03:00
|
|
|
|
2022-03-02 17:50:32 +02:00
|
|
|
-- Additional LSP features for Java
|
|
|
|
use 'mfussenegger/nvim-jdtls'
|
2022-02-24 18:08:59 +02:00
|
|
|
|
2022-08-14 20:36:32 +03:00
|
|
|
-- Display function signature
|
|
|
|
use {'ray-x/lsp_signature.nvim'}
|
|
|
|
|
2021-10-06 19:08:11 +03:00
|
|
|
-- Completion
|
2021-12-18 00:19:49 +02:00
|
|
|
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
|
|
|
|
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
|
|
|
|
use 'hrsh7th/cmp-path' -- Path source for nvim-cmp
|
|
|
|
use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
|
|
|
|
use 'L3MON4D3/LuaSnip' -- Snippets plugin
|
2022-08-14 20:36:32 +03:00
|
|
|
use 'rafamadriz/friendly-snippets' -- Snippets collection
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- treesitter syntax highlight
|
2022-08-05 09:37:38 +03:00
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
run = function()
|
|
|
|
require('nvim-treesitter.install').update({with_sync = true})
|
|
|
|
end
|
|
|
|
}
|
2021-08-08 15:33:23 +03:00
|
|
|
|
2021-08-18 21:20:20 +03:00
|
|
|
-- treesitter plugin for commentstring
|
|
|
|
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
|
|
|
|
2021-10-06 19:08:11 +03:00
|
|
|
-- Additional plugins for formats not supported
|
|
|
|
-- by treesitter
|
|
|
|
use 'jamespeapen/swayconfig.vim'
|
2021-08-18 21:20:20 +03:00
|
|
|
|
|
|
|
-- mappings for commenting in code
|
|
|
|
use 'tpope/vim-commentary'
|
|
|
|
|
2021-10-06 19:08:11 +03:00
|
|
|
-- 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'
|
|
|
|
}
|
|
|
|
|
2021-11-20 12:13:39 +02:00
|
|
|
-- Neovim inside Firefox
|
|
|
|
use {
|
|
|
|
'glacambre/firenvim',
|
|
|
|
run = function() vim.fn['firenvim#install'](0) end
|
|
|
|
}
|
|
|
|
|
2022-04-17 23:23:53 +03:00
|
|
|
-- Vim <3 Asciidoctor
|
|
|
|
use 'habamax/vim-asciidoctor'
|
2022-04-10 13:16:45 +03:00
|
|
|
|
2021-08-08 15:33:23 +03:00
|
|
|
end)
|
|
|
|
|
|
|
|
-- Install plugins if packer was not installed
|
|
|
|
if packer_not_installed > 0 then cmd 'PackerInstall' end
|