dotfiles/home/.config/nvim/lua/plugins/plugin_list.lua

125 lines
4.7 KiB
Lua
Raw Normal View History

local vim = require("vim")
local fn = vim.fn
local plugin_directory = fn.stdpath("config") .. "/lua/plugins/settings"
-- 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 = {
2021-12-09 00:17:25 +00:00
{ "airblade/vim-gitgutter" }, -- Git status in files
{ "dhruvasagar/vim-table-mode" }, -- Easy way to construct markdown tables
{ "wakatime/vim-wakatime" }, -- Track time spent coding
{ "mhinz/vim-startify" }, -- Nice startup screen for vim when started withotu file/dir
{ "dbeniamine/cheat.sh-vim" }, -- Quick interaction with cheat.sh cheatsheets
2021-12-09 23:53:08 +00:00
{
"tveskag/nvim-blame-line", -- Show commit affecting cursor line
config = get_plugin_file("blame_line.lua")
},
{
2021-12-09 00:17:25 +00:00
"vimwiki/vimwiki", -- Wiki pages for vim
config = get_plugin_file("vimwiki.lua"),
},
{
"tpope/vim-commentary", -- Adds ability to comment out sections of files
config = get_plugin_file("commentary.lua")
},
{
"tomasiser/vim-code-dark", -- Vim theme inspired by vscode's Dark+
config = get_plugin_file("vim-code-dark.lua")
},
{
"nvim-treesitter/nvim-treesitter", -- AST language analysis providing semantic highlighting
config = get_plugin_file("treesitter.lua"),
run = ':TSUpdate',
requires = { "nvim-treesitter/playground", opt = true }
},
{
2021-12-09 00:17:25 +00:00
"vim-airline/vim-airline", -- Status line
config = get_plugin_file("airline.lua"),
2021-12-09 00:17:25 +00:00
requires = {
{ "vim-airline/vim-airline-themes" },
{ "ryanoasis/vim-devicons" },
2021-12-09 00:17:25 +00:00
},
},
2021-12-09 23:55:40 +00:00
-- TODO: Consider changing this to nvim-tree
{
2021-12-09 00:17:25 +00:00
"preservim/nerdtree", -- File tree
config = get_plugin_file("nerdtree.lua"),
requires = {
{ "Xuyuanp/nerdtree-git-plugin" },
{ "tiagofumo/vim-nerdtree-syntax-highlight" },
{ "ryanoasis/vim-devicons" },
},
},
{
2021-12-09 00:17:25 +00:00
"mfussenegger/nvim-dap", -- Support for the debugging within vim
config = get_plugin_file("nvim-dap.lua"),
requires = { "mfussenegger/nvim-dap-python" },
},
{
2021-12-09 00:17:25 +00:00
"junegunn/fzf.vim", -- Fuzzy finder (TODO: consider replacing with telescope)
run = function() fn['fzf#install']() end,
config = get_plugin_file("fzf.lua"),
2021-12-09 00:17:25 +00:00
requires = {
{ "junegunn/fzf" },
{ "stsewd/fzf-checkout.vim" },
2021-12-09 00:17:25 +00:00
}
},
2021-12-08 21:34:30 +00:00
{
2021-12-09 00:17:25 +00:00
'glacambre/firenvim', -- Integrates neovim into the browser
2021-12-08 21:34:30 +00:00
config = get_plugin_file("firenvim.lua"),
run = function() vim.fn['firenvim#install'](0) end
},
2021-12-08 22:10:05 +00:00
{
2021-12-09 23:55:40 +00:00
"williamboman/nvim-lsp-installer", -- LSP auto-installer
2021-12-08 22:10:05 +00:00
config = get_plugin_file("lsp.lua"),
2021-12-08 23:54:06 +00:00
requires = {
2021-12-09 23:55:40 +00:00
-- Predefined LSP server configurations
2021-12-08 23:54:06 +00:00
"neovim/nvim-lspconfig",
2021-12-09 23:55:40 +00:00
-- Support for autocompletion
2021-12-08 23:54:06 +00:00
"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-09 00:17:25 +00:00
-- TODO: Consider testing out telescope as an alternative to FZF, I've heard a lot of
-- positive feedback about it, but I haven't yet got the chance to meaningfully test
-- it and configure it.
--{
-- "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-09 00:17:25 +00:00
-- Coc is disabled because we're using LSP. It implements support from language servers from
-- scratch, which is slower than neovim's built-in LSP and since this configuration won't work
-- with pure vim, we can rely on nvim-only thigns. I left it here because LSP can sometimes
-- cause issues and Coc is a lot more friendly to setup.
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 },
-- },
}
return plugin_list