2021-09-03 01:18:44 -07:00
|
|
|
-- Load plugins
|
2021-09-07 01:49:23 -07:00
|
|
|
-- 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-07 01:49:23 -07:00
|
|
|
-- }
|
2021-09-03 01:18:44 -07:00
|
|
|
|
|
|
|
return require('packer').startup(function()
|
2021-09-25 02:19:19 -07:00
|
|
|
|
2021-09-03 01:18:44 -07:00
|
|
|
-- Packer
|
2021-09-15 21:42:31 -07:00
|
|
|
use { -- packer
|
2021-09-03 01:18:44 -07:00
|
|
|
'wbthomason/packer.nvim'
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Colors
|
2021-09-27 19:21:36 -07:00
|
|
|
use { -- treesitter: syntax highlighting and more
|
2021-09-03 01:18:44 -07:00
|
|
|
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
|
|
|
config = function()
|
2021-09-27 20:29:55 -07:00
|
|
|
require('blake.lsp').treesitter()
|
2021-09-03 01:18:44 -07:00
|
|
|
end,
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- onedark theme
|
2021-09-03 01:18:44 -07:00
|
|
|
'navarasu/onedark.nvim',
|
|
|
|
config = function()
|
2021-11-22 01:14:18 -08:00
|
|
|
-- vim.g.onedark_transparent_background = true
|
2021-09-03 01:43:41 -07:00
|
|
|
require('onedark').setup()
|
2021-09-03 01:18:44 -07:00
|
|
|
end
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- color tag highlighter
|
2021-09-03 01:18:44 -07:00
|
|
|
'norcalli/nvim-colorizer.lua'
|
|
|
|
}
|
|
|
|
|
|
|
|
-- IDE features
|
|
|
|
---- LSP
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- lsp installer
|
2021-09-27 20:29:55 -07:00
|
|
|
'kabouzeid/nvim-lspinstall',
|
|
|
|
setup = function()
|
|
|
|
-- reload the current file so lsp actually starts for it
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd 'silent! e %'
|
|
|
|
end, 0)
|
|
|
|
end,
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- Default LSP configs
|
2021-09-27 20:29:55 -07:00
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
after = 'nvim-lspinstall',
|
2021-09-03 01:18:44 -07:00
|
|
|
config = function()
|
2021-09-27 20:29:55 -07:00
|
|
|
require('blake.lsp').lspconfig()
|
2021-09-03 01:18:44 -07:00
|
|
|
end
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- compe
|
2021-09-27 20:29:55 -07:00
|
|
|
'hrsh7th/nvim-cmp',
|
2021-09-06 17:56:58 -07:00
|
|
|
config = function()
|
2021-09-24 21:20:05 -07:00
|
|
|
require('blake.lsp').cmp()
|
2021-09-06 17:56:58 -07:00
|
|
|
end,
|
|
|
|
requires = { -- nvim-cmp sources
|
2021-09-27 20:29:55 -07:00
|
|
|
'hrsh7th/cmp-path',
|
|
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
|
|
'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-10-26 02:51:13 -07:00
|
|
|
use { -- Icons for each entry in the completion menu
|
|
|
|
'onsails/lspkind-nvim',
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- function parameter previews
|
2021-09-27 20:29:55 -07:00
|
|
|
'ray-x/lsp_signature.nvim',
|
|
|
|
after = 'nvim-lspconfig',
|
2021-09-03 01:18:44 -07:00
|
|
|
config = function()
|
2021-09-27 20:29:55 -07:00
|
|
|
require('blake.lsp').signature()
|
2021-09-03 01:18:44 -07:00
|
|
|
end,
|
|
|
|
}
|
2021-11-16 23:26:02 -08:00
|
|
|
-- use { -- Use the percent (%) key for more things
|
|
|
|
-- 'andymass/vim-matchup',
|
|
|
|
-- }
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- ALE: Support for lots of linters, etc
|
|
|
|
'dense-analysis/ale',
|
2021-10-28 23:40:58 -07:00
|
|
|
ft = {'sh', 'zsh', 'zshrc', 'bashrc', 'bash'},
|
2021-09-06 17:56:58 -07:00
|
|
|
config = function()
|
|
|
|
vim.g.ale_disable_lsp = 1
|
|
|
|
end
|
|
|
|
}
|
2021-09-05 13:47:46 -07:00
|
|
|
|
2021-09-28 01:52:37 -07:00
|
|
|
---- DAP (Debug Adapter Protocol)
|
|
|
|
use { -- nvim-dap: DAP support
|
|
|
|
'mfussenegger/nvim-dap',
|
|
|
|
config = function()
|
|
|
|
require('blake.dap').nvim_dap()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
use { -- DAP adapter installer
|
|
|
|
'Pocco81/DAPInstall.nvim',
|
|
|
|
config = function()
|
|
|
|
require('blake.dap').dap_install()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
use { -- virtual-text: Print Variable names while debugging
|
|
|
|
'theHamsta/nvim-dap-virtual-text',
|
|
|
|
config = function()
|
2021-11-20 17:09:28 -08:00
|
|
|
require("nvim-dap-virtual-text").setup()
|
2021-09-28 01:52:37 -07:00
|
|
|
end
|
|
|
|
}
|
|
|
|
use { -- a UI for nvim-dap (easy access to info)
|
|
|
|
'rcarriga/nvim-dap-ui',
|
|
|
|
config = function()
|
|
|
|
require('blake.dap').dap_ui()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2021-09-03 01:53:53 -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()
|
2021-09-24 21:20:05 -07:00
|
|
|
require('blake.other').gitsigns()
|
2021-09-15 21:42:31 -07:00
|
|
|
end,
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
2021-09-06 21:21:51 -07:00
|
|
|
use { -- file manager
|
|
|
|
'kyazdani42/nvim-tree.lua',
|
|
|
|
requires = 'kyazdani42/nvim-web-devicons',
|
2021-09-03 01:18:44 -07:00
|
|
|
config = function()
|
2021-09-24 21:20:05 -07:00
|
|
|
require('blake.other').nvimtree()
|
2021-09-03 01:18:44 -07:00
|
|
|
end
|
|
|
|
}
|
|
|
|
use { -- terminal
|
2021-09-27 20:29:55 -07:00
|
|
|
'akinsho/toggleterm.nvim',
|
2021-09-03 01:18:44 -07:00
|
|
|
config = function()
|
2021-09-24 21:20:05 -07:00
|
|
|
require('blake.other').toggleterm()
|
2021-09-03 01:18:44 -07:00
|
|
|
end
|
|
|
|
}
|
2021-09-05 13:47:46 -07:00
|
|
|
use { -- Smooth Scrolling
|
2021-09-27 20:29:55 -07:00
|
|
|
'karb94/neoscroll.nvim',
|
2021-09-20 02:48:09 -07:00
|
|
|
config = function()
|
2021-09-24 21:20:05 -07:00
|
|
|
require('blake.other').neoscroll()
|
2021-09-20 02:48:09 -07:00
|
|
|
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()
|
2021-09-24 21:20:05 -07:00
|
|
|
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
|
2021-11-20 17:09:28 -08:00
|
|
|
use { -- Web browser integration
|
2021-11-19 18:18:58 -08:00
|
|
|
'raghur/vim-ghost',
|
2021-11-20 17:09:28 -08:00
|
|
|
config = function() -- Map :GS to :GhostStart
|
2021-11-19 18:18:58 -08:00
|
|
|
vim.cmd 'command! GS GhostStart'
|
|
|
|
end
|
|
|
|
}
|
2021-09-03 01:18:44 -07:00
|
|
|
use { -- Undo tree
|
|
|
|
'mbbill/undotree',
|
2021-09-07 01:49:23 -07:00
|
|
|
config = function()
|
|
|
|
vim.cmd 'nnoremap <F5> <cmd>UndotreeToggle<CR>'
|
2021-09-27 20:29:55 -07:00
|
|
|
vim.api.nvim_set_keymap('n', '<F5>', '<cmd>UndotreeToggle<CR>', { noremap = true, silent = true, })
|
2021-09-07 01:49:23 -07:00
|
|
|
end
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
2021-11-16 23:26:02 -08:00
|
|
|
use { -- Quote pairing
|
|
|
|
'windwp/nvim-autopairs',
|
|
|
|
config = function()
|
|
|
|
require('nvim-autopairs').setup()
|
|
|
|
end
|
|
|
|
}
|
2021-09-03 01:18:44 -07:00
|
|
|
use { -- Alignment
|
|
|
|
'junegunn/vim-easy-align',
|
|
|
|
}
|
2021-09-26 14:29:44 -07:00
|
|
|
use { -- cheat.sh integration
|
2021-09-27 20:29:55 -07:00
|
|
|
'dbeniamine/cheat.sh-vim',
|
2021-09-26 14:29:44 -07:00
|
|
|
}
|
2021-11-20 17:09:28 -08:00
|
|
|
use { -- Comments (gb and gc)
|
2021-10-27 04:40:14 -07:00
|
|
|
'numToStr/Comment.nvim',
|
|
|
|
config = function()
|
|
|
|
require('Comment').setup()
|
|
|
|
end
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
2021-10-27 04:40:14 -07:00
|
|
|
use { -- tpope: surround
|
|
|
|
'tpope/vim-surround'
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- tpope: git integration
|
2021-09-03 01:18:44 -07:00
|
|
|
'tpope/vim-fugitive'
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- tpope: Repeatability for various tpope plugins
|
2021-09-03 01:18:44 -07:00
|
|
|
'tpope/vim-repeat',
|
|
|
|
}
|
2021-09-25 02:19:19 -07:00
|
|
|
|
2021-10-20 10:57:24 -07:00
|
|
|
-- Bootstrap packer if needed {
|
|
|
|
if packer_bootstrap then
|
|
|
|
require('packer').sync()
|
|
|
|
end -- }
|
2021-09-03 01:18:44 -07:00
|
|
|
end)
|
|
|
|
|
|
|
|
-- vim:fdm=marker:fmr={,}:expandtab:tabstop=3:sw=3
|
|
|
|
|