2022-02-20 11:10:47 +00:00
|
|
|
local fn = vim.fn
|
|
|
|
|
2022-02-21 14:15:15 +00:00
|
|
|
-- boostrap packer
|
2022-02-22 08:27:45 +00:00
|
|
|
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
|
2022-02-20 11:10:47 +00:00
|
|
|
local packer_bootstrap
|
|
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
2022-02-22 08:27:45 +00:00
|
|
|
packer_bootstrap = fn.system({
|
|
|
|
'git', 'clone', 'https://github.com/wbthomason/packer.nvim',
|
|
|
|
install_path
|
|
|
|
})
|
2022-02-20 11:10:47 +00:00
|
|
|
end
|
|
|
|
|
2022-02-21 14:15:15 +00:00
|
|
|
-- run PackerSync everytime plugins.lua is updated
|
|
|
|
vim.cmd([[
|
2022-02-20 11:10:47 +00:00
|
|
|
augroup packer_user_config
|
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
|
|
|
augroup end
|
|
|
|
]])
|
|
|
|
|
2022-02-21 14:15:15 +00:00
|
|
|
vim.cmd([[packadd packer.nvim]])
|
|
|
|
|
|
|
|
-- initialize plugins
|
2022-02-20 11:10:47 +00:00
|
|
|
return require('packer').startup(function(use)
|
2022-02-22 08:27:45 +00:00
|
|
|
-- let packer manage itself
|
2022-04-25 18:18:25 +00:00
|
|
|
use({ 'wbthomason/packer.nvim', opt = true })
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- theme
|
2022-02-21 14:15:15 +00:00
|
|
|
use("ishan9299/nvim-solarized-lua")
|
|
|
|
|
|
|
|
-- commenting
|
2022-04-02 08:49:56 +00:00
|
|
|
use {
|
|
|
|
'numToStr/Comment.nvim',
|
2022-04-26 06:42:45 +00:00
|
|
|
config = function() require('Comment').setup({}) end
|
2022-04-02 08:49:56 +00:00
|
|
|
}
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- session handling
|
|
|
|
use('tpope/vim-obsession')
|
|
|
|
use('dhruvasagar/vim-prosession')
|
|
|
|
|
|
|
|
-- tabline
|
|
|
|
use {
|
|
|
|
'kdheepak/tabline.nvim',
|
|
|
|
config = function()
|
2022-04-25 18:18:25 +00:00
|
|
|
require 'tabline'.setup {
|
2022-02-22 08:27:45 +00:00
|
|
|
enable = true,
|
2022-04-25 18:18:25 +00:00
|
|
|
options = { show_bufnr = true, show_filename_only = true }
|
2022-02-22 08:27:45 +00:00
|
|
|
}
|
|
|
|
end,
|
|
|
|
requires = {
|
2022-04-25 18:18:25 +00:00
|
|
|
{ 'hoob3rt/lualine.nvim' },
|
|
|
|
{ 'kyazdani42/nvim-web-devicons', opt = true }
|
2022-02-22 08:27:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-02 08:50:40 +00:00
|
|
|
-- status line
|
|
|
|
use {
|
|
|
|
'nvim-lualine/lualine.nvim',
|
2022-04-25 18:18:25 +00:00
|
|
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
2022-04-18 11:02:32 +00:00
|
|
|
config = function()
|
|
|
|
require('lualine').setup({
|
2022-04-25 18:18:25 +00:00
|
|
|
options = { globalstatus = true },
|
2022-04-26 06:42:45 +00:00
|
|
|
sections = {
|
2022-04-26 11:59:50 +00:00
|
|
|
lualine_c = { { "filename", path = 1 }, "require('lsp-status').status()" }
|
2022-04-26 06:42:45 +00:00
|
|
|
},
|
2022-04-25 18:18:25 +00:00
|
|
|
extensions = { "toggleterm" }
|
2022-04-18 11:02:32 +00:00
|
|
|
})
|
|
|
|
end
|
2022-04-02 08:50:40 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- blankline
|
|
|
|
use({
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
config = function()
|
|
|
|
require("indent_blankline").setup {
|
|
|
|
char = "┊",
|
2022-04-25 18:18:25 +00:00
|
|
|
buftype_exclude = { "terminal", "help", "nofile" },
|
|
|
|
filetype_exclude = { 'help', 'packer' },
|
2022-02-24 06:57:25 +00:00
|
|
|
show_trailing_blankline_indent = false
|
2022-02-22 08:27:45 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
-- git
|
|
|
|
use('tpope/vim-fugitive')
|
|
|
|
use({
|
|
|
|
'lewis6991/gitsigns.nvim',
|
2022-04-25 18:18:25 +00:00
|
|
|
requires = { 'nvim-lua/plenary.nvim' },
|
2022-02-22 08:27:45 +00:00
|
|
|
config = function() require('gitsigns').setup() end
|
|
|
|
})
|
2022-04-02 08:50:28 +00:00
|
|
|
use("junegunn/gv.vim")
|
2022-02-22 08:27:45 +00:00
|
|
|
|
|
|
|
-- autocompletion
|
|
|
|
use({
|
2022-04-04 15:30:26 +00:00
|
|
|
"L3MON4D3/LuaSnip",
|
2022-04-25 18:18:25 +00:00
|
|
|
requires = { "rafamadriz/friendly-snippets" },
|
2022-04-04 15:30:26 +00:00
|
|
|
config = function()
|
|
|
|
require("luasnip.loaders.from_vscode").lazy_load()
|
|
|
|
end
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"hrsh7th/nvim-cmp",
|
|
|
|
requires = {
|
|
|
|
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-cmdline", "hrsh7th/cmp-git", "hrsh7th/cmp-nvim-lua",
|
2022-04-04 17:52:02 +00:00
|
|
|
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp-signature-help",
|
|
|
|
"davidsierradz/cmp-conventionalcommits", "hrsh7th/cmp-nvim-lua",
|
|
|
|
"hrsh7th/cmp-calc"
|
2022-04-04 15:30:26 +00:00
|
|
|
},
|
2022-04-25 18:18:25 +00:00
|
|
|
config = function() require('plugins.nvim-cmp') end,
|
2022-02-22 08:27:45 +00:00
|
|
|
})
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- language server
|
2022-04-25 18:18:25 +00:00
|
|
|
use {
|
|
|
|
'junnplus/nvim-lsp-setup',
|
|
|
|
requires = {
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
'williamboman/nvim-lsp-installer',
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-04-25 18:18:25 +00:00
|
|
|
-- additional rust tools
|
|
|
|
"simrat39/rust-tools.nvim",
|
|
|
|
|
|
|
|
-- highlight current symbol
|
|
|
|
"RRethy/vim-illuminate",
|
2022-04-25 18:50:42 +00:00
|
|
|
|
|
|
|
-- lua plugin development
|
|
|
|
"folke/lua-dev.nvim",
|
2022-04-26 06:42:45 +00:00
|
|
|
|
|
|
|
-- lsp status
|
|
|
|
"nvim-lua/lsp-status.nvim",
|
2022-04-25 18:18:25 +00:00
|
|
|
},
|
|
|
|
config = function() require('plugins.nvim-lsp-setup') end,
|
|
|
|
}
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-05-18 14:20:47 +00:00
|
|
|
-- null-ls
|
|
|
|
use {
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
requres = {
|
|
|
|
{ "nvim-lua/plenary.nvim" },
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
require("null-ls").setup({
|
|
|
|
sources = {
|
|
|
|
require("null-ls").builtins.formatting.prettier,
|
|
|
|
},
|
|
|
|
on_attach = function(client)
|
|
|
|
local utils = require("nvim-lsp-setup.utils")
|
|
|
|
utils.format_on_save(client)
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- treesitter
|
|
|
|
use({
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
config = function() require('plugins.treesitter') end,
|
|
|
|
run = ':TSUpdate'
|
|
|
|
})
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
-- Telescope
|
|
|
|
use({
|
2022-05-18 08:21:09 +00:00
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
requires = {
|
|
|
|
{ "nvim-lua/plenary.nvim" },
|
|
|
|
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
|
|
|
|
{ "nvim-telescope/telescope-ui-select.nvim" },
|
|
|
|
},
|
|
|
|
config = function() require("plugins.telescope") end
|
2022-02-22 08:27:45 +00:00
|
|
|
})
|
2022-02-21 14:15:15 +00:00
|
|
|
|
2022-02-22 07:46:12 +00:00
|
|
|
-- automatic pairs
|
2022-04-25 18:18:25 +00:00
|
|
|
use({ "Raimondi/delimitMate" })
|
2022-04-08 06:03:34 +00:00
|
|
|
|
2022-02-21 15:46:37 +00:00
|
|
|
-- markdown preview
|
2022-04-28 07:01:19 +00:00
|
|
|
use({ "iamcco/markdown-preview.nvim", run = ":call mkdp#util#install()" })
|
2022-02-21 15:46:37 +00:00
|
|
|
|
|
|
|
-- terminal
|
|
|
|
use({
|
|
|
|
"akinsho/nvim-toggleterm.lua",
|
|
|
|
config = function()
|
2022-04-25 18:18:25 +00:00
|
|
|
require("toggleterm").setup({ size = 32, open_mapping = [[<F4>]] })
|
2022-02-22 08:27:45 +00:00
|
|
|
end
|
2022-02-21 15:46:37 +00:00
|
|
|
})
|
|
|
|
|
2022-02-21 18:54:49 +00:00
|
|
|
-- buffer closing
|
2022-04-25 18:18:25 +00:00
|
|
|
use({ "sar/bbye.nvim" })
|
2022-02-21 18:54:49 +00:00
|
|
|
|
2022-02-21 18:55:01 +00:00
|
|
|
-- ansible filetype
|
2022-04-25 18:18:25 +00:00
|
|
|
use({ "pearofducks/ansible-vim" })
|
2022-02-21 18:55:01 +00:00
|
|
|
|
2022-04-27 17:56:22 +00:00
|
|
|
-- nvim-notify
|
|
|
|
use({ "rcarriga/nvim-notify",
|
|
|
|
config = function()
|
|
|
|
require("notify").setup({
|
|
|
|
stages = "fade",
|
|
|
|
})
|
|
|
|
vim.notify = require("notify")
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2022-02-22 08:27:45 +00:00
|
|
|
if packer_bootstrap then require('packer').sync() end
|
2022-02-21 14:15:15 +00:00
|
|
|
end)
|