213 lines
6.7 KiB
Lua
213 lines
6.7 KiB
Lua
-- Load plugins
|
|
-- Bootstrap packer if needed {
|
|
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
|
|
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
|
vim.cmd 'packadd packer.nvim'
|
|
end
|
|
-- }
|
|
|
|
return require('packer').startup({function()
|
|
|
|
-- Packer
|
|
use { -- packer
|
|
'wbthomason/packer.nvim',
|
|
config = function() -- Map :PS to :PackerSync
|
|
vim.cmd 'command! PS PackerSync'
|
|
end
|
|
}
|
|
|
|
-- Colors
|
|
use { -- treesitter: syntax highlighting and more
|
|
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
|
config = function()
|
|
require('blake.lsp').treesitter()
|
|
end,
|
|
}
|
|
use { -- onedark theme
|
|
'navarasu/onedark.nvim',
|
|
config = function()
|
|
-- vim.g.onedark_transparent_background = true
|
|
require('onedark').setup()
|
|
end
|
|
}
|
|
use { -- color tag highlighter
|
|
'norcalli/nvim-colorizer.lua'
|
|
}
|
|
|
|
-- IDE features
|
|
---- LSP
|
|
use { -- lsp installer
|
|
'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,
|
|
}
|
|
use { -- Default LSP configs
|
|
'neovim/nvim-lspconfig',
|
|
after = 'nvim-lspinstall',
|
|
config = function()
|
|
require('blake.lsp').lspconfig()
|
|
end
|
|
}
|
|
use { -- compe
|
|
'hrsh7th/nvim-cmp',
|
|
config = function()
|
|
require('blake.lsp').cmp()
|
|
end,
|
|
requires = { -- nvim-cmp sources (not required by cmp, but reqired by my configuration)
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-nvim-lua',
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
'hrsh7th/cmp-calc',
|
|
'f3fora/cmp-spell',
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/cmp-emoji',
|
|
}
|
|
}
|
|
use { -- Icons for each entry in the completion menu
|
|
'onsails/lspkind-nvim',
|
|
}
|
|
use { -- function parameter previews
|
|
'ray-x/lsp_signature.nvim',
|
|
after = 'nvim-lspconfig',
|
|
config = function()
|
|
require('blake.lsp').signature()
|
|
end,
|
|
}
|
|
-- use { -- Use the percent (%) key for more things
|
|
-- 'andymass/vim-matchup',
|
|
-- }
|
|
use { -- ALE: Support for lots of linters, etc
|
|
'dense-analysis/ale',
|
|
ft = {'sh', 'zsh', 'zshrc', 'bashrc', 'bash'},
|
|
config = function()
|
|
vim.g.ale_disable_lsp = 1
|
|
end
|
|
}
|
|
|
|
---- 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()
|
|
require("nvim-dap-virtual-text").setup()
|
|
end
|
|
}
|
|
use { -- a UI for nvim-dap (easy access to info)
|
|
'rcarriga/nvim-dap-ui',
|
|
config = function()
|
|
require('blake.dap').dap_ui()
|
|
end,
|
|
}
|
|
|
|
---- Other IDE features
|
|
use { -- git integration
|
|
'lewis6991/gitsigns.nvim',
|
|
requires = {
|
|
'nvim-lua/plenary.nvim'
|
|
},
|
|
config = function()
|
|
require('blake.other').gitsigns()
|
|
end,
|
|
}
|
|
use { -- file manager
|
|
'kyazdani42/nvim-tree.lua',
|
|
requires = 'kyazdani42/nvim-web-devicons',
|
|
config = function()
|
|
require('blake.other').nvimtree()
|
|
end
|
|
}
|
|
use { -- terminal
|
|
'akinsho/toggleterm.nvim',
|
|
config = function()
|
|
require('blake.other').toggleterm()
|
|
end
|
|
}
|
|
use { -- Smooth Scrolling
|
|
'karb94/neoscroll.nvim',
|
|
config = function()
|
|
require('blake.other').neoscroll()
|
|
end,
|
|
}
|
|
use { -- automatic session management
|
|
'rmagatti/auto-session',
|
|
config = function()
|
|
require('blake.other').autosession()
|
|
end
|
|
}
|
|
use { -- Markdown preview
|
|
'ellisonleao/glow.nvim',
|
|
ft = { 'md', 'markdown', }
|
|
}
|
|
|
|
-- Conveniences
|
|
use { -- Web browser integration
|
|
'raghur/vim-ghost',
|
|
opt = true,
|
|
cmd = {'GhostStart', 'GhostInstall', 'GhostStop', 'GhostSync', 'GhostToggleSync'},
|
|
config = function() -- Map :GS to :GhostStart
|
|
vim.cmd 'command! GS GhostStart'
|
|
end
|
|
}
|
|
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
|
|
}
|
|
use { -- Quote pairing
|
|
'windwp/nvim-autopairs',
|
|
config = function()
|
|
require('nvim-autopairs').setup()
|
|
end
|
|
}
|
|
use { -- Alignment
|
|
'junegunn/vim-easy-align',
|
|
}
|
|
use { -- cheat.sh integration
|
|
'dbeniamine/cheat.sh-vim',
|
|
}
|
|
use { -- Comments (gb and gc)
|
|
'numToStr/Comment.nvim',
|
|
config = function()
|
|
require('Comment').setup()
|
|
end
|
|
}
|
|
use { -- tpope: surround
|
|
'tpope/vim-surround'
|
|
}
|
|
use { -- tpope: git integration
|
|
'tpope/vim-fugitive'
|
|
}
|
|
use { -- tpope: Repeatability for various tpope plugins
|
|
'tpope/vim-repeat',
|
|
}
|
|
|
|
-- Bootstrap packer if needed {
|
|
if packer_bootstrap then
|
|
require('packer').sync()
|
|
end -- }
|
|
end,
|
|
config = {
|
|
display = { open_fn = require('packer.util').float }
|
|
}})
|
|
|
|
-- vim:fdm=marker:fmr={,}:fdl=1:expandtab:tabstop=3:sw=3
|
|
|