2022-02-20 11:10:47 +00:00
|
|
|
local fn = vim.fn
|
|
|
|
local cmd = vim.cmd
|
|
|
|
|
|
|
|
-- Boostrap Packer
|
|
|
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
|
|
|
local packer_bootstrap
|
|
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
|
|
|
packer_bootstrap = fn.system({'git', 'clone','https://github.com/wbthomason/packer.nvim', install_path})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Rerun PackerSync everytime plugins.lua is updated
|
|
|
|
cmd([[
|
|
|
|
augroup packer_user_config
|
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
|
|
|
augroup end
|
|
|
|
]])
|
|
|
|
|
|
|
|
-- Initialize pluggins
|
|
|
|
return require('packer').startup(function(use)
|
|
|
|
-- Let Packer manage itself
|
|
|
|
use('wbthomason/packer.nvim')
|
|
|
|
|
2022-02-20 11:25:12 +00:00
|
|
|
-- Themes
|
|
|
|
use('altercation/vim-colors-solarized')
|
|
|
|
|
2022-02-20 12:08:57 +00:00
|
|
|
-- session handling
|
|
|
|
use('tpope/vim-obsession')
|
|
|
|
use('dhruvasagar/vim-prosession')
|
|
|
|
|
2022-02-20 12:19:04 +00:00
|
|
|
-- status line
|
|
|
|
use {
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
|
|
|
config = function()
|
|
|
|
require('lualine').setup()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2022-02-20 11:11:20 +00:00
|
|
|
-- git commands
|
2022-02-20 19:08:17 +00:00
|
|
|
use({
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
config = function ()
|
|
|
|
require("indent_blankline").setup {
|
|
|
|
char = "┊",
|
|
|
|
buftype_exclude = {"terminal", "help"}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2022-02-20 19:09:42 +00:00
|
|
|
-- language server
|
|
|
|
use("neovim/nvim-lspconfig")
|
|
|
|
|
2022-02-20 19:08:36 +00:00
|
|
|
-- autocompletion
|
|
|
|
use({
|
|
|
|
"ms-jpq/coq_nvim",
|
|
|
|
branch="coq",
|
|
|
|
})
|
|
|
|
use({'ms-jpq/coq.artifacts', branch = 'artifacts'})
|
|
|
|
|
2022-02-20 19:09:42 +00:00
|
|
|
local language_servers = { "bashls", "rls", "sumneko_lua" }
|
|
|
|
for _, server in pairs(language_servers) do
|
|
|
|
require("lspconfig")[server].setup(require("coq").lsp_ensure_capabilities({}))
|
|
|
|
end
|
|
|
|
|
2022-02-20 11:11:20 +00:00
|
|
|
use('tpope/vim-fugitive')
|
2022-02-20 19:06:27 +00:00
|
|
|
use ({
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
requires = {'nvim-lua/plenary.nvim'},
|
|
|
|
config = function() require('gitsigns').setup() end
|
|
|
|
})
|
2022-02-20 11:11:20 +00:00
|
|
|
|
2022-02-20 11:10:47 +00:00
|
|
|
if packer_bootstrap then
|
|
|
|
require('packer').sync()
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|