dotfiles/.config/nvim/lua/blake/plugins.lua

186 lines
5.9 KiB
Lua
Raw Normal View History

2021-09-03 01:18:44 -07:00
-- Load plugins
-- Bootstrap packer if needed {
2021-09-03 01:18:44 -07:00
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
2021-09-05 13:47:46 -07:00
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd 'packadd packer.nvim'
2021-09-03 01:18:44 -07:00
end
-- }
2021-09-03 01:18:44 -07:00
return require('packer').startup(function()
-- Packer
2021-09-15 21:42:31 -07:00
use { -- packer
2021-09-03 01:18:44 -07:00
'wbthomason/packer.nvim'
}
-- Colors
use { -- syntax highlighting
2021-09-03 01:18:44 -07:00
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
config = function()
require("blake.lsp").treesitter()
2021-09-03 01:18:44 -07:00
end,
}
use { -- onedark theme
2021-09-03 01:18:44 -07:00
'navarasu/onedark.nvim',
config = function()
2021-09-03 01:43:41 -07:00
-- vim.g.onedark_transparent_background = true,
require('onedark').setup()
2021-09-03 01:18:44 -07:00
end
}
use { -- color tag highlighter
2021-09-03 01:18:44 -07:00
'norcalli/nvim-colorizer.lua'
}
-- IDE features
---- LSP
use { -- lsp installer
2021-09-03 01:18:44 -07:00
"kabouzeid/nvim-lspinstall",
-- opt = true,
-- setup = function()
-- require("blake.other").packer_lazy_load "nvim-lspinstall"
2021-09-03 01:18:44 -07:00
-- -- reload the current file so lsp actually starts for it
-- vim.defer_fn(function()
-- vim.cmd "silent! e %"
-- end, 0)
-- end,
}
use { -- DAP: Debug Adapter Protocol
2021-09-15 21:42:31 -07:00
"mfussenegger/nvim-dap",
config = function()
require("blake.lsp").dap()
2021-09-15 21:42:31 -07:00
end
}
use { -- DAP adapter installer
2021-09-15 21:42:31 -07:00
"Pocco81/DAPInstall.nvim",
config = function()
require("blake.lsp").dapinstall()
2021-09-15 21:42:31 -07:00
end
}
use { -- Default LSP configs
2021-09-03 01:18:44 -07:00
"neovim/nvim-lspconfig",
after = "nvim-lspinstall",
config = function()
require("blake.lsp").lspconfig()
2021-09-03 01:18:44 -07:00
end
}
use { -- Icons for each entry in the completion menu
"onsails/lspkind-nvim",
}
use { -- compe
2021-09-05 13:47:46 -07:00
"hrsh7th/nvim-cmp",
config = function()
require('blake.lsp').cmp()
end,
requires = { -- nvim-cmp sources
2021-09-24 09:51:00 -07:00
-- "saadparwaiz1/cmp_luasnip", --luasnip integration
"hrsh7th/cmp-path",
"hrsh7th/cmp-nvim-lsp",
2021-09-05 13:47:46 -07:00
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-latex-symbols",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-calc",
"hrsh7th/cmp-look",
2021-09-05 13:47:46 -07:00
}
}
2021-09-24 09:51:00 -07:00
-- use { -- code snippits
-- "L3MON4D3/LuaSnip",
-- -- "hrsh7th/vim-vsnip",
-- -- "rafamadriz/friendly-snippets",
-- }
use { -- function parameter previews
2021-09-03 01:18:44 -07:00
"ray-x/lsp_signature.nvim",
after = "nvim-lspconfig",
config = function()
require("blake.lsp").signature()
2021-09-03 01:18:44 -07:00
end,
}
use { -- Use the % key for more things
"andymass/vim-matchup",
-- setup = function()
-- require("blake.other").packer_lazy_load "vim-matchup"
2021-09-03 01:18:44 -07:00
-- end,
}
use { -- ALE: Support for lots of linters, etc
'dense-analysis/ale',
2021-09-23 17:13:06 -07:00
ft = {'sh', 'zsh', 'bash', 'html', 'markdown', 'racket', 'vim', 'tex'},
config = function()
vim.g.ale_disable_lsp = 1
end
}
2021-09-05 13:47:46 -07:00
---- Other IDE features
2021-09-03 01:18:44 -07:00
use { -- git integration
'lewis6991/gitsigns.nvim',
requires = {
'nvim-lua/plenary.nvim'
},
2021-09-15 21:42:31 -07:00
config = function()
require('blake.other').gitsigns()
2021-09-15 21:42:31 -07:00
end,
2021-09-03 01:18:44 -07:00
}
use { -- file manager
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
2021-09-03 01:18:44 -07:00
config = function()
require('blake.other').nvimtree()
2021-09-03 01:18:44 -07:00
end
}
use { -- terminal
"akinsho/toggleterm.nvim",
config = function()
require('blake.other').toggleterm()
2021-09-03 01:18:44 -07:00
end
}
2021-09-05 13:47:46 -07:00
use { -- Smooth Scrolling
"karb94/neoscroll.nvim",
config = function()
require('blake.other').neoscroll()
end,
2021-09-05 13:47:46 -07:00
}
2021-09-07 17:59:31 -07:00
use { -- automatic session management
'rmagatti/auto-session',
config = function()
require('blake.other').autosession()
2021-09-07 17:59:31 -07:00
end
}
2021-09-20 10:09:26 -07:00
use { -- Markdown preview
2021-09-15 21:39:21 -07:00
'ellisonleao/glow.nvim',
ft = { 'md', 'markdown', }
}
2021-09-03 01:18:44 -07:00
-- Conveniences
use { -- Undo tree
'mbbill/undotree',
config = function()
vim.cmd 'nnoremap <F5> <cmd>UndotreeToggle<CR>'
vim.api.nvim_set_keymap("n", "<F5>", "<cmd>UndotreeToggle<CR>", { noremap = true, silent = true, })
end
2021-09-03 01:18:44 -07:00
}
use { -- Quote pairing
'jiangmiao/auto-pairs'
}
use { -- Alignment
'junegunn/vim-easy-align',
}
use { -- tpope: Quote/parenthesis changing
2021-09-03 01:18:44 -07:00
'tpope/vim-surround'
}
use { -- tpope: Comments
2021-09-03 01:18:44 -07:00
'tpope/vim-commentary'
}
use { -- tpope: git integration
2021-09-03 01:18:44 -07:00
'tpope/vim-fugitive'
}
use { -- tpope: Repeatability for various tpope plugins
2021-09-03 01:18:44 -07:00
'tpope/vim-repeat',
}
2021-09-20 10:09:26 -07:00
use { -- cheat.sh integration
"dbeniamine/cheat.sh-vim",
}
2021-09-03 01:18:44 -07:00
end)
-- vim:fdm=marker:fmr={,}:expandtab:tabstop=3:sw=3