2021-09-03 01:18:44 -07:00
|
|
|
-- 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
|
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
|
|
|
|
|
|
|
|
return require('packer').startup(function()
|
|
|
|
-- Packer
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- plugins
|
2021-09-03 01:18:44 -07:00
|
|
|
'wbthomason/packer.nvim'
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Colors
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- syntax highlighting
|
2021-09-03 01:18:44 -07:00
|
|
|
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
|
|
|
config = function()
|
|
|
|
require("lsp").treesitter()
|
|
|
|
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-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
|
|
|
|
}
|
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-03 01:18:44 -07:00
|
|
|
"kabouzeid/nvim-lspinstall",
|
|
|
|
-- opt = true,
|
|
|
|
-- setup = function()
|
|
|
|
-- require("other").packer_lazy_load "nvim-lspinstall"
|
|
|
|
-- -- reload the current file so lsp actually starts for it
|
|
|
|
-- vim.defer_fn(function()
|
|
|
|
-- vim.cmd "silent! e %"
|
|
|
|
-- end, 0)
|
|
|
|
-- end,
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- Default LSP configs
|
2021-09-03 01:18:44 -07:00
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
after = "nvim-lspinstall",
|
|
|
|
config = function()
|
|
|
|
require("lsp").lspconfig()
|
|
|
|
end
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
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",
|
2021-09-06 17:56:58 -07:00
|
|
|
config = function()
|
|
|
|
require('lsp').cmp()
|
|
|
|
end,
|
|
|
|
requires = { -- nvim-cmp sources
|
2021-09-05 13:47:46 -07:00
|
|
|
"hrsh7th/vim-vsnip",
|
2021-09-06 17:56:58 -07:00
|
|
|
"rafamadriz/friendly-snippets",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
2021-09-05 13:47:46 -07:00
|
|
|
"hrsh7th/cmp-buffer",
|
2021-09-06 17:56:58 -07:00
|
|
|
"hrsh7th/cmp-nvim-lua",
|
|
|
|
"hrsh7th/cmp-latex-symbols",
|
|
|
|
"hrsh7th/cmp-vsnip",
|
|
|
|
"hrsh7th/cmp-emoji",
|
|
|
|
"hrsh7th/cmp-calc",
|
|
|
|
"hrsh7th/cmp-look",
|
2021-09-05 13:47:46 -07:00
|
|
|
}
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- function parameter previews
|
2021-09-03 01:18:44 -07:00
|
|
|
"ray-x/lsp_signature.nvim",
|
|
|
|
after = "nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require("lsp").signature()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
use { -- Use the % key for more things
|
|
|
|
"andymass/vim-matchup",
|
|
|
|
-- setup = function()
|
|
|
|
-- require("other").packer_lazy_load "vim-matchup"
|
|
|
|
-- end,
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- ALE: Support for lots of linters, etc
|
|
|
|
'dense-analysis/ale',
|
|
|
|
ft = {'sh', 'zsh', 'bash', 'c', 'cc', 'cpp', 'cmake', 'html', 'markdown', 'racket', 'vim', 'tex'},
|
|
|
|
config = function()
|
|
|
|
vim.g.ale_disable_lsp = 1
|
|
|
|
end
|
|
|
|
}
|
2021-09-05 13:47:46 -07:00
|
|
|
|
2021-09-03 01:18:44 -07:00
|
|
|
|
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'
|
|
|
|
},
|
|
|
|
-- config = function()
|
|
|
|
-- require('other').gitsigns()
|
|
|
|
-- end
|
|
|
|
}
|
2021-09-05 13:47:46 -07:00
|
|
|
-- use { -- file manager
|
|
|
|
-- 'kyazdani42/nvim-tree.lua',
|
|
|
|
-- requires = 'kyazdani42/nvim-web-devicons',
|
|
|
|
-- config = function()
|
|
|
|
-- require('other').nvimtree()
|
|
|
|
-- end
|
|
|
|
-- }
|
|
|
|
use { -- new file manager
|
|
|
|
'ms-jpq/chadtree',
|
|
|
|
branch = 'chad',
|
|
|
|
run = 'python3 -m chadtree deps',
|
2021-09-03 01:18:44 -07:00
|
|
|
config = function()
|
2021-09-05 13:47:46 -07:00
|
|
|
require('other').chadtree()
|
2021-09-03 01:18:44 -07:00
|
|
|
end
|
2021-09-05 13:47:46 -07:00
|
|
|
-- config = funciton ()
|
|
|
|
-- vim.cmd 'nnoremap <leader>v <cmd>CHADopen<cr>'
|
|
|
|
-- end
|
2021-09-03 01:18:44 -07:00
|
|
|
}
|
|
|
|
use { -- terminal
|
|
|
|
"akinsho/toggleterm.nvim",
|
|
|
|
config = function()
|
|
|
|
require('other').toggleterm()
|
|
|
|
end
|
|
|
|
}
|
2021-09-05 13:47:46 -07:00
|
|
|
use { -- Smooth Scrolling
|
|
|
|
"karb94/neoscroll.nvim",
|
|
|
|
-- disable = not plugin_status.neoscroll,
|
|
|
|
-- opt = true,
|
|
|
|
-- config = function()
|
|
|
|
-- require("plugins.configs.others").neoscroll()
|
|
|
|
-- end,
|
|
|
|
-- setup = function()
|
|
|
|
-- require("core.utils").packer_lazy_load "neoscroll.nvim"
|
|
|
|
-- end,
|
|
|
|
}
|
2021-09-03 01:18:44 -07:00
|
|
|
|
|
|
|
-- Conveniences
|
|
|
|
use { -- Undo tree
|
|
|
|
'mbbill/undotree',
|
|
|
|
}
|
|
|
|
use { -- Quote pairing
|
|
|
|
'jiangmiao/auto-pairs'
|
|
|
|
}
|
|
|
|
use { -- Alignment
|
|
|
|
'junegunn/vim-easy-align',
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- tpope: Quote/parenthesis changing
|
2021-09-03 01:18:44 -07:00
|
|
|
'tpope/vim-surround'
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
use { -- tpope: Comments
|
2021-09-03 01:18:44 -07:00
|
|
|
'tpope/vim-commentary'
|
|
|
|
}
|
2021-09-06 17:56:58 -07:00
|
|
|
-- use { -- Comments (lua)
|
2021-09-03 01:18:44 -07:00
|
|
|
-- "terrortylor/nvim-comment",
|
|
|
|
-- require('conveniences').nvim_comment()
|
|
|
|
-- }
|
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',
|
|
|
|
}
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- vim:fdm=marker:fmr={,}:expandtab:tabstop=3:sw=3
|
|
|
|
|