2021-12-07 21:17:56 +00:00
|
|
|
local vim = require("vim")
|
|
|
|
local fn = vim.fn
|
|
|
|
|
2021-12-07 21:23:55 +00:00
|
|
|
local plugin_directory = fn.stdpath("config") .. "/lua/plugins/settings"
|
2021-12-07 21:17:56 +00:00
|
|
|
|
|
|
|
-- Return the line (string) to be executed with lua that loads in given plugin file.
|
|
|
|
-- This is useful for the `config` or `setup` parameters of packer's use to source
|
|
|
|
-- both `.vim` and `.lua` files.
|
|
|
|
-- Expects a `plugin_file` which is a relative path from the `plugin_directory` folder.
|
|
|
|
local function get_plugin_file(plugin_file)
|
|
|
|
local source_line = string.format('source %s/%s', plugin_directory, plugin_file)
|
|
|
|
return string.format("vim.fn.execute('%s')", source_line)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Define packer plugins
|
|
|
|
-- The individual tables will get passed into the packer's use function
|
|
|
|
local plugin_list = {
|
|
|
|
{ "airblade/vim-gitgutter" },
|
|
|
|
{ "dhruvasagar/vim-table-mode" },
|
|
|
|
{ "wakatime/vim-wakatime" },
|
|
|
|
{ "mhinz/vim-startify" },
|
|
|
|
{ "ryanoasis/vim-devicons" },
|
2021-12-08 19:12:49 +00:00
|
|
|
{ "dbeniamine/cheat.sh-vim" },
|
2021-12-07 21:17:56 +00:00
|
|
|
{ "vimwiki/vimwiki", config = get_plugin_file("vimwiki.lua") },
|
|
|
|
{ "tpope/vim-commentary", config = get_plugin_file("commentary.lua") },
|
|
|
|
{ "junegunn/fzf", run = function() fn['fzf#install']() end },
|
|
|
|
{ "tomasiser/vim-code-dark", config = get_plugin_file("vim-code-dark.lua") },
|
2021-12-08 19:10:40 +00:00
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
config = get_plugin_file("treesitter.lua"),
|
|
|
|
run = ':TSUpdate',
|
|
|
|
requires = { "nvim-treesitter/playground", opt = true }
|
|
|
|
},
|
2021-12-07 21:17:56 +00:00
|
|
|
{
|
|
|
|
"vim-airline/vim-airline",
|
|
|
|
config = get_plugin_file("airline.lua"),
|
|
|
|
requires = { "vim-airline/vim-airline-themes", opt = true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"preservim/nerdtree",
|
|
|
|
config = get_plugin_file("nerdtree.lua"),
|
|
|
|
requires = {
|
|
|
|
{ "Xuyuanp/nerdtree-git-plugin", opt = true },
|
|
|
|
{ "tiagofumo/vim-nerdtree-syntax-highlight", opt = true },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"mfussenegger/nvim-dap",
|
|
|
|
config = get_plugin_file("nvim-dap.lua"),
|
|
|
|
requires = { "mfussenegger/nvim-dap-python", opt = true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"junegunn/fzf.vim",
|
|
|
|
config = get_plugin_file("fzf.lua"),
|
|
|
|
after = "fzf",
|
|
|
|
requires = { "stsewd/fzf-checkout.vim", opt = true },
|
|
|
|
},
|
2021-12-08 21:34:30 +00:00
|
|
|
{
|
|
|
|
'glacambre/firenvim',
|
|
|
|
config = get_plugin_file("firenvim.lua"),
|
|
|
|
run = function() vim.fn['firenvim#install'](0) end
|
|
|
|
},
|
2021-12-08 22:10:05 +00:00
|
|
|
{
|
|
|
|
"williamboman/nvim-lsp-installer",
|
|
|
|
config = get_plugin_file("lsp.lua"),
|
2021-12-08 23:54:06 +00:00
|
|
|
requires = {
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
"hrsh7th/nvim-cmp",
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-cmdline",
|
|
|
|
},
|
2021-12-08 22:10:05 +00:00
|
|
|
},
|
2021-12-07 21:23:55 +00:00
|
|
|
--{
|
|
|
|
-- "nvim-telescope/telescope.nvim",
|
|
|
|
-- --config = get_plugin_file("telescope.lua")
|
|
|
|
-- module = "telescope",
|
|
|
|
-- cmd = "Telescope",
|
|
|
|
-- requires = {
|
|
|
|
-- { "nvim-lua/popup.nvim" },
|
|
|
|
-- { "nvim-lua/plenary.nvim" },
|
|
|
|
-- }
|
|
|
|
--},
|
2021-12-08 22:10:05 +00:00
|
|
|
-- {
|
|
|
|
-- "neoclide/coc.nvim",
|
|
|
|
-- branch = "release",
|
|
|
|
-- config = get_plugin_file("coc.vim"),
|
|
|
|
-- requires = { "antoinemadec/coc-fzf", opt = true },
|
|
|
|
-- },
|
2021-12-07 21:17:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return plugin_list
|