You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

146 lines
5.8 KiB

return {
--------------------------------------------------------------------------------
-- UI
--------------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Better netrw file browsing
--
-- Rather than use something like NERDtree, allow browsing the filesystem
-- directly in a buffer. For a general overview of why I think this is
-- good, see http://vimcasts.org/blog/2013/01/oil-and-vinegar-split-windows-and-project-drawer/
--
-- * Press '-' anywhere to open the file browser, and go up a folder when
-- in the file browser.
-- * Press gh in the file browser to toggle hidden (dot) files.
-- * Press y to tank the absolute path of the file you've selected.
-- * Press ~ to go to your home directory.
--
{ name = 'tpope/vim-vinegar' },
----------------------------------------------------------------------------
-- Improved status bar
--
-- Show your current mode... but also git branch, file path, changes, file
-- type, line endings, line number, and a whole bunch of other stuff. With
-- icons and pretty colours.
--
-- The "themes" package provides color schemes that will adapt to several
-- popular pre-existing themes.
--
-- TODO: Actually configure this because the default options are quite noisy.
--
{ name = 'vim-airline/vim-airline' },
{ name = 'vim-airline/vim-airline-themes' },
----------------------------------------------------------------------------
-- Fuzzy find files
--
-- Search through all files in the current folder (or current project thanks
-- to vim-rooter) with a fuzzy search.
--
-- Telescope can provide similar functionality (more colors, previews files,
-- etc) but I don't like the interface and can't be arsed to figure out the
-- customization right now. Main issues are that it supports "command" mode
-- (why) so cancelling takes two escapes, and I want to use either j/k or
-- ctrl+j/k to scroll lists not arrow keys and ctrl+n/p.
--
{
name = 'ctrlpvim/ctrlp.vim',
config = {
-- Only load this plugin once one of these vim commands is triggered
['on'] = { 'CtrlP', 'CtrlPMixed', 'CtrlPMRU' }
},
keys = {
{ mode = 'n', key = { '<C-p>' }, map = ':CtrlP<CR>', options = { silent = true }, label = 'fuzzy find files' },
}
},
----------------------------------------------------------------------------
-- Toggleterm - Better vim terminals
--
-- This provides a persistent, hide-able terminal that you can pull up
-- anywhere. It seems to be a little less awkward than the built-in terminal
-- as well as far as vim modes and such.
--
{
name = 'akinsho/toggleterm.nvim',
config = { branch = 'main' },
keys = {
-- { mode = 'n', key = { '<C-t>' }, map = '<cmd>exe "v:count" + tabpagenr() . "ToggleTerm"<CR>', label = "open terminal", options = { silent = true } },
-- { mode = 't', key = { '<C-t>' }, map = '<cmd>exe "v:count" + tabpagenr() . "ToggleTerm"<CR>', label = "close terminal", options = { silent = true } },
{ mode = 'n', key = { '<C-t>' }, map = '<cmd>exe v:count1 . "ToggleTerm"<CR>', label = "toggle terminal", options = { silent = true } },
{ mode = 't', key = { '<C-t>' }, map = '<cmd>exe v:count1 . "ToggleTerm"<CR>', label = "toggle terminal", options = { silent = true } },
}
},
----------------------------------------------------------------------------
-- Input/select UI improvements
--
-- Dressing provides an improved vim.ui.input and vim.ui.select interface by
-- using any of a variety of drivers.
--
-- Telescope is one such driver. If telescope isn't enabled, this should
-- fall back on some less-good-but-still-better-than-default builtins.
--
{ name = 'stevearc/dressing.nvim' },
----------------------------------------------------------------------------
-- UI framework
--
-- Telescope provides an implementation of some nicer select boxes as well
-- as several built-in functions for triggering them to do various things.
--
-- If telescope is enabled, it will take over the git branch selection ui
-- from the custom one I've added to vim-fugitive.
--
{
name = 'nvim-telescope/telescope.nvim',
keys = {
{ mode = 'n', key = { '<leader>', 'g', 'z' }, map = ':lua require("telescope.builtin").git_branches()<cr>', label = 'checkout' },
}
},
----------------------------------------------------------------------------
-- Colour previews
--
-- Highlight hex codes (and in css, css named colors + rgb/hsl, etc) by
-- colouring their background to match the colour.
--
{ name = 'ap/vim-css-color' },
----------------------------------------------------------------------------
-- Dim inactive buffers
--
-- By default this is set to dim them only a little so it's _very_ slight.
-- Still able to reference things in other buffers easily but provides a
-- small focusing effect on the active buffer.
--
--
-- This is the original. Bunch of unmerged PRs that fix bugs.
-- { name = 'sunjon/Shade.nvim', config = { opacity = 75 } },
-- This is a fork that, at least at the time, basically just had all the PRs
-- merged.
{ name = 'jghauser/shade.nvim', config = { opacity = 60 , branch = "main" } },
----------------------------------------------------------------------------
-- Easier buffer moving
--
-- This allows you to move buffers around a little more easily.
--
{
name = 'sindrets/winshift.nvim',
config = {
branch = 'main',
['on'] = { 'WinShift' }
},
keys = {
{ mode = 'n', key = { '<M-H>' }, map = '<Cmd>WinShift left<CR>', label = 'move buffer left' },
{ mode = 'n', key = { '<M-J>' }, map = '<Cmd>WinShift down<CR>', label = 'move buffer down' },
{ mode = 'n', key = { '<M-K>' }, map = '<Cmd>WinShift up<CR>', label = 'move buffer up' },
{ mode = 'n', key = { '<M-L>' }, map = '<Cmd>WinShift right<CR>', label = 'move buffer right' },
}
},
}