2021-09-03 01:18:44 -07:00
-- Load plugins
2021-12-02 03:00:51 -08:00
-- Bootstrap packer if needed {{
2021-09-03 01:18:44 -07:00
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
2022-08-24 04:11:15 -07:00
Packer_bootstrap = fn.system ( { ' git ' , ' clone ' , ' --depth ' , ' 1 ' , ' https://github.com/wbthomason/packer.nvim ' , install_path } )
2022-08-13 01:58:52 -07:00
vim.cmd [[packadd packer.nvim]]
2021-09-03 01:18:44 -07:00
end
2021-12-02 03:00:51 -08:00
-- }}
2021-09-03 01:18:44 -07:00
2022-10-23 05:10:11 -07:00
-- set packer threads {{
2022-08-24 04:53:27 -07:00
-- Reduce the maximum number of jobs in termux (a terminal for android) or if WEAK_SYSTEM is set to true
2022-08-25 02:53:07 -07:00
if ( os.getenv ( " TERMUX_VERSION " ) ~= nil ) or ( os.getenv ( " WEAK_SYSTEM " ) == " true " ) then
2022-08-24 04:11:50 -07:00
Packer_max_jobs = 5
else
Packer_max_jobs = 100
end
2021-12-16 14:41:01 -08:00
local use = require ( ' packer ' ) . use
2022-10-23 05:10:11 -07:00
-- }}
2021-12-16 14:41:01 -08:00
2021-11-25 04:32:01 -08:00
return require ( ' packer ' ) . startup ( { function ( )
2021-12-02 03:00:51 -08:00
-- TODO: Find a better way to organize this
-- impatient (needs to go early)
2022-07-26 02:24:10 -07:00
use { -- lewis6991: impatient: Make nvim load faster by caching them - needs to load early
2021-12-02 03:00:51 -08:00
' lewis6991/impatient.nvim ' ,
2021-12-03 01:05:26 -08:00
config = function ( )
require ( ' impatient ' )
end ,
2021-12-02 03:00:51 -08:00
}
2021-09-25 02:19:19 -07:00
2021-09-03 01:18:44 -07:00
-- Packer
2022-07-26 02:24:10 -07:00
use { -- packer: plugin manager
2021-11-25 04:32:01 -08:00
' wbthomason/packer.nvim ' ,
2021-12-03 01:05:26 -08:00
config = function ( )
-- Map :PS to :PackerSync
2022-08-30 13:40:38 -07:00
vim.cmd ' cab PS PackerSync '
2022-08-13 01:58:52 -07:00
end ,
2021-09-03 01:18:44 -07:00
}
2021-12-02 03:00:51 -08:00
-- Colors (decorations)
2022-07-26 02:24:10 -07:00
use { -- treesitter: syntax highlighting and more
2022-08-27 15:08:05 -07:00
' nvim-treesitter/nvim-treesitter ' ,
run = ' :TSUpdate ' ,
2021-09-03 01:18:44 -07:00
config = function ( )
2021-09-27 20:29:55 -07:00
require ( ' blake.lsp ' ) . treesitter ( )
2021-09-03 01:18:44 -07:00
end ,
2021-12-02 03:00:51 -08:00
}
2022-07-26 02:24:10 -07:00
use { -- onedark.nvim: onedark theme
2021-09-03 01:18:44 -07:00
' navarasu/onedark.nvim ' ,
config = function ( )
2021-11-22 01:14:18 -08:00
-- vim.g.onedark_transparent_background = true
2021-12-26 16:18:33 -08:00
vim.cmd [ [
2022-02-06 22:13:22 -08:00
" au ColorScheme onedark hi TabLine gui=none guibg='#282C34' guifg='#5C6370' " all tabs color
2021-12-26 16:18:33 -08:00
au ColorScheme onedark hi TabLineSel guibg = ' #282C34 ' guifg = ' #B5BBC7 ' " Highlighted tab color
2022-02-06 22:13:22 -08:00
" au ColorScheme onedark hi TabLineFill guibg='#282C34' " tabline portion without tabs ( right - hand side )
2021-12-26 16:18:33 -08:00
] ]
end
}
2022-07-26 02:24:10 -07:00
use { -- tokyonight.nvim: tokyonight theme
2022-06-04 22:12:08 -07:00
' folke/tokyonight.nvim ' ,
2022-06-09 20:30:33 -07:00
config = function ( )
2022-08-14 15:49:06 -07:00
-- vim.g.tokyonight_style = "night"
2022-08-13 04:07:58 -07:00
vim.g . tokyonight_italic_functions = true
vim.g . tokyonight_sidebars = { " nvimtree " , " qf " , " vista_kind " , " terminal " , " packer " }
2022-06-09 20:30:33 -07:00
vim.cmd [ [
2022-06-17 01:36:55 -07:00
au ColorScheme tokyonight hi TabLine gui = none guibg = ' #1D202F ' guifg = ' #565F89 ' " all tabs color
2022-06-09 20:30:33 -07:00
au ColorScheme tokyonight hi TabLineSel guibg = ' #24283B ' guifg = ' #C0CAF5 ' " Highlighted tab color
2022-06-17 01:36:55 -07:00
au ColorScheme tokyonight hi TabLineFill guibg = ' #1D202F ' " tabline portion without tabs (right-hand side)
2022-06-09 20:30:33 -07:00
] ]
2022-06-17 01:36:55 -07:00
-- Has to be put here so it runs synchronously
vim.cmd ' colorscheme tokyonight '
2022-06-09 20:30:33 -07:00
end ,
2022-06-04 22:12:08 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- newspring: Good light theme for writing
2022-01-31 19:45:08 -08:00
' NLKNguyen/papercolor-theme ' ,
}
2022-07-26 02:24:10 -07:00
use { -- statusline: lualine
2021-12-26 16:18:33 -08:00
' nvim-lualine/lualine.nvim ' ,
2022-08-15 14:34:35 -07:00
requires = { ' kyazdani42/nvim-web-devicons ' , opt = true } ,
2021-12-26 16:18:33 -08:00
config = function ( )
require ( ' blake.other ' ) . lualine ( )
end ,
}
2022-11-10 01:41:13 -08:00
-- use { -- nvim-tabline: batter looking tabline
-- 'alvarosevilla95/luatab.nvim',
-- requires = { 'kyazdani42/nvim-web-devicons' },
-- config = function()
-- require('luatab').setup()
-- end
-- }
2022-07-26 02:24:10 -07:00
use { -- nvim-colorizer: css color tag highlighter (ex- #FFB13B)
2021-12-16 14:41:01 -08:00
' norcalli/nvim-colorizer.lua ' ,
config = function ( )
2022-08-30 13:40:38 -07:00
vim.cmd ' cab COL ColorizerToggle '
2021-12-16 14:41:01 -08:00
end ,
}
2022-08-24 04:11:15 -07:00
use { -- vim-illuminate: highlight other occurrences of the word under cursor
2022-08-25 02:40:09 -07:00
' RRethy/vim-illuminate ' ,
-- commit = '27f6ef135a88d9410a33cf92fc47f5c018df552c', -- for finding the correct color to make highlights
2022-08-24 04:11:15 -07:00
config = function ( )
2022-08-25 02:40:09 -07:00
vim.keymap . set ( ' n ' , ' <a-i> ' , require ( ' illuminate ' ) . toggle_freeze_buf )
2022-08-24 04:11:15 -07:00
require ( ' illuminate ' ) . configure ( {
providers = {
' treesitter ' ,
' regex ' ,
}
} )
end
}
2021-09-03 01:18:44 -07:00
2022-10-23 05:10:11 -07:00
-- Tree-sitter
use { -- treesitter-context: equivalent to vsc*de's "sticky scrolling"
2023-10-30 11:04:28 -07:00
' nvim-treesitter/nvim-treesitter-context ' ,
config = function ( )
require ( ' treesitter-context ' ) . setup {
enable = true , -- Enable this plugin (Can be enabled/disabled later via commands)
max_lines = 5 , -- How many lines the window should span. Values <= 0 mean no limit.
min_window_height = 0 , -- Minimum editor window height to enable context. Values <= 0 mean no limit.
line_numbers = true ,
multiline_threshold = 1 , -- Maximum number of lines to show for a single context
trim_scope = ' outer ' , -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
mode = ' topline ' , -- Line used to calculate context. Choices: 'cursor', 'topline'
-- Separator between context and content. Should be a single character string, like '-'.
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
separator = nil ,
zindex = 20 , -- The Z-index of the context window
on_attach = nil , -- (fun(buf: integer): boolean) return false to disable attaching
}
end
2022-10-23 05:10:11 -07:00
}
2021-09-03 01:18:44 -07:00
-- IDE features
2022-05-13 04:28:53 -07:00
---- LSP
2022-07-26 02:24:10 -07:00
use { -- lspinstall: language server installer, (lspconfig is here too)
2021-12-07 15:23:04 -08:00
' williamboman/nvim-lsp-installer ' ,
2022-07-26 02:21:23 -07:00
{ -- lspconfig: default language server configurations
2022-05-13 04:28:53 -07:00
' neovim/nvim-lspconfig ' ,
config = function ( )
require ( ' blake.lsp ' ) . lspinstall ( )
require ( ' blake.lsp ' ) . lspconfig ( )
end
}
2021-09-03 01:18:44 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- cmp: completion menu
2021-09-27 20:29:55 -07:00
' hrsh7th/nvim-cmp ' ,
2021-09-06 17:56:58 -07:00
config = function ( )
2021-09-24 21:20:05 -07:00
require ( ' blake.lsp ' ) . cmp ( )
2021-09-06 17:56:58 -07:00
end ,
2021-12-02 03:00:51 -08:00
requires = { -- (mostly) nvim-cmp sources (not required by cmp, but reqired by my configuration)
2021-11-25 04:32:01 -08:00
' f3fora/cmp-spell ' ,
2021-09-27 20:29:55 -07:00
' hrsh7th/cmp-buffer ' ,
2023-05-28 19:29:20 -07:00
' hrsh7th/cmp-calc ' ,
2021-11-25 05:16:30 -08:00
' hrsh7th/cmp-cmdline ' ,
2021-09-27 20:29:55 -07:00
' hrsh7th/cmp-emoji ' ,
2023-05-28 19:29:20 -07:00
' hrsh7th/cmp-nvim-lsp ' ,
' hrsh7th/cmp-nvim-lua ' ,
' hrsh7th/cmp-path ' ,
' jc-doyle/cmp-pandoc-references ' ,
' onsails/lspkind-nvim ' , -- icons for entries of the completion menu, required by config
' ray-x/cmp-treesitter ' ,
' saadparwaiz1/cmp_luasnip ' ,
2021-12-07 15:23:04 -08:00
} ,
2021-09-05 13:47:46 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- luasnip: snippits plugin
2022-04-25 14:00:19 -07:00
' L3MON4D3/LuaSnip ' ,
2022-07-26 02:21:23 -07:00
config = function ( )
require ( " luasnip.loaders.from_vscode " ) . lazy_load ( )
end
2022-04-25 14:00:19 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- friendly-snippets: lots of good snippits
2022-07-26 02:21:23 -07:00
' rafamadriz/friendly-snippets '
}
2022-07-26 02:24:10 -07:00
use { -- lsp_signature: function parameter previews
2021-09-27 20:29:55 -07:00
' ray-x/lsp_signature.nvim ' ,
after = ' nvim-lspconfig ' ,
2021-09-03 01:18:44 -07:00
config = function ( )
2021-09-27 20:29:55 -07:00
require ( ' blake.lsp ' ) . signature ( )
2021-09-03 01:18:44 -07:00
end ,
}
2022-07-26 02:24:10 -07:00
use { -- symbols-outline: treesitter-based document outline (SO)
2021-12-02 03:00:51 -08:00
' simrat39/symbols-outline.nvim ' ,
config = function ( )
2022-08-30 13:40:38 -07:00
vim.cmd ' cab SO SymbolsOutline '
2022-05-02 03:48:00 -07:00
vim.cmd ' nnoremap <Leader>so <cmd>SymbolsOutline<CR> '
2021-12-02 03:00:51 -08:00
end ,
}
2022-08-08 15:58:02 -07:00
use { -- null-ls: Support for lots of programming tools, but through nvim lsp
' jose-elias-alvarez/null-ls.nvim ' ,
2022-08-25 02:43:32 -07:00
requires = { ' nvim-lua/plenary.nvim ' } ,
2022-08-08 15:58:02 -07:00
config = function ( )
local null_ls = require ( " null-ls " )
require ( " null-ls " ) . setup ( {
sources = {
null_ls.builtins . code_actions.refactoring ,
2023-05-01 21:43:49 -07:00
null_ls.builtins . formatting.alejandra ,
2022-08-25 02:43:32 -07:00
null_ls.builtins . formatting.jq ,
2022-08-08 15:58:02 -07:00
}
} )
end
}
2022-08-13 02:03:55 -07:00
use { -- refactoring: Refactoring tools for neovim
2022-08-08 15:58:02 -07:00
' ThePrimeagen/refactoring.nvim ' ,
requires = {
2022-08-15 14:34:35 -07:00
{ ' nvim-lua/plenary.nvim ' } ,
{ ' nvim-treesitter/nvim-treesitter ' }
2022-08-08 15:58:02 -07:00
} ,
config = function ( )
require ( ' refactoring ' ) . setup ( { } )
-- Remaps for the refactoring operations currently offered by the plugin
vim.api . nvim_set_keymap ( " v " , " <leader>re " , [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function')<CR>]] , { noremap = true , silent = true , expr = false } )
vim.api . nvim_set_keymap ( " v " , " <leader>rf " , [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function To File')<CR>]] , { noremap = true , silent = true , expr = false } )
vim.api . nvim_set_keymap ( " v " , " <leader>rv " , [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Variable')<CR>]] , { noremap = true , silent = true , expr = false } )
vim.api . nvim_set_keymap ( " v " , " <leader>ri " , [[ <Esc><Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]] , { noremap = true , silent = true , expr = false } )
-- Extract block doesn't need visual mode
vim.api . nvim_set_keymap ( " n " , " <leader>rb " , [[ <Cmd>lua require('refactoring').refactor('Extract Block')<CR>]] , { noremap = true , silent = true , expr = false } )
vim.api . nvim_set_keymap ( " n " , " <leader>rbf " , [[ <Cmd>lua require('refactoring').refactor('Extract Block To File')<CR>]] , { noremap = true , silent = true , expr = false } )
-- Inline variable can also pick up the identifier currently under the cursor without visual mode
vim.api . nvim_set_keymap ( " n " , " <leader>ri " , [[ <Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]] , { noremap = true , silent = true , expr = false } )
-- Refactoring telescope integration
-- load refactoring Telescope extension
require ( " telescope " ) . load_extension ( " refactoring " )
-- remap to open the Telescope refactoring menu in visual mode
vim.api . nvim_set_keymap (
" v " ,
" <leader>rr " ,
" <Esc><cmd>lua require('telescope').extensions.refactoring.refactors()<CR> " ,
{ noremap = true }
)
end ,
}
2022-08-17 19:42:37 -07:00
2021-09-28 01:52:37 -07:00
---- DAP (Debug Adapter Protocol)
2022-07-26 02:24:10 -07:00
use { -- nvim-dap: DAP support
2021-09-28 01:52:37 -07:00
' mfussenegger/nvim-dap ' ,
config = function ( )
require ( ' blake.dap ' ) . nvim_dap ( )
end
}
2022-08-13 01:58:52 -07:00
-- use { -- dap-buddy: DAP adapter installer - DBInstall
2022-04-27 00:50:10 -07:00
-- 'Pocco81/dap-buddy.nvim',
-- config = function()
-- require('blake.dap').dap_buddy()
-- end
-- }
2022-07-26 02:24:10 -07:00
use { -- virtual-text: Print Variable names while debugging
2021-09-28 01:52:37 -07:00
' theHamsta/nvim-dap-virtual-text ' ,
2024-05-16 12:54:28 -07:00
requires = { " mfussenegger/nvim-dap " , " nvim-neotest/nvim-nio " } ,
2021-09-28 01:52:37 -07:00
config = function ( )
2022-08-13 04:07:58 -07:00
-- calling this with a parameter to keep lua language server from complaining
require ( " nvim-dap-virtual-text " ) . setup ( { context_commentstring = { enable = true , } } )
2021-09-28 01:52:37 -07:00
end
}
2022-07-26 02:24:10 -07:00
use { -- nvim-dap-ui: a UI for nvim-dap
2021-09-28 01:52:37 -07:00
' rcarriga/nvim-dap-ui ' ,
2022-08-15 14:34:35 -07:00
requires = { ' mfussenegger/nvim-dap ' } ,
2021-09-28 01:52:37 -07:00
config = function ( )
require ( ' blake.dap ' ) . dap_ui ( )
end ,
}
2022-08-15 14:39:58 -07:00
use { -- debugprint: automatic debug print statement creator - bind g?{p/P,v/V,o/O}
' andrewferrier/debugprint.nvim ' ,
requires = { ' nvim-treesitter/nvim-treesitter ' } ,
config = function ( )
require ( ' debugprint ' ) . setup ( )
end
}
2021-09-28 01:52:37 -07:00
2021-09-03 01:53:53 -07:00
---- Other IDE features
2022-07-26 02:24:10 -07:00
use { -- telescope: fuzzy finder for finding fuzzy things
2022-04-15 14:32:46 -07:00
' nvim-telescope/telescope.nvim ' ,
2022-08-15 14:34:35 -07:00
requires = { ' nvim-lua/plenary.nvim ' } ,
2022-04-15 14:32:46 -07:00
config = function ( )
require ( ' blake.other ' ) . telescope ( )
end
}
2022-08-30 12:57:56 -07:00
use { -- trouble: one big list of code errors from all sources (lsp, quickfix)
2022-08-29 12:17:34 -07:00
' folke/trouble.nvim ' ,
requires = " kyazdani42/nvim-web-devicons " ,
config = function ( )
require ( ' trouble ' ) . setup ( { mode = " quickfix " } )
end
}
2022-08-30 12:57:56 -07:00
use { -- bqf: improved quickfix list
' kevinhwang91/nvim-bqf ' ,
2022-08-30 12:59:07 -07:00
ft = ' qf ' ,
2022-08-30 12:57:56 -07:00
}
2022-08-30 13:09:48 -07:00
use { -- pqf: prettier quickfix list
' https://gitlab.com/yorickpeterse/nvim-pqf ' ,
ft = ' qf ' ,
}
2022-07-26 02:24:10 -07:00
use { -- gitsigns: git integration
2021-09-03 01:18:44 -07:00
' lewis6991/gitsigns.nvim ' ,
2022-08-15 14:34:35 -07:00
requires = { ' nvim-lua/plenary.nvim ' } ,
2021-09-15 21:42:31 -07:00
config = function ( )
2021-09-24 21:20:05 -07:00
require ( ' blake.other ' ) . gitsigns ( )
2021-09-15 21:42:31 -07:00
end ,
2021-09-03 01:18:44 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- toggleterm: terminal
2021-09-27 20:29:55 -07:00
' akinsho/toggleterm.nvim ' ,
2022-08-09 12:16:54 -07:00
branch = ' main ' ,
2021-09-03 01:18:44 -07:00
config = function ( )
2021-09-24 21:20:05 -07:00
require ( ' blake.other ' ) . toggleterm ( )
2021-09-03 01:18:44 -07:00
end
}
2022-07-26 02:24:10 -07:00
use { -- neoscroll: Smooth Scrolling
2021-09-27 20:29:55 -07:00
' karb94/neoscroll.nvim ' ,
2022-08-09 11:29:43 -07:00
disable = true ,
2021-09-20 02:48:09 -07:00
config = function ( )
2021-09-24 21:20:05 -07:00
require ( ' blake.other ' ) . neoscroll ( )
2021-09-20 02:48:09 -07:00
end ,
2021-09-05 13:47:46 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- auto-session: automatic session management
2021-09-07 17:59:31 -07:00
' rmagatti/auto-session ' ,
config = function ( )
2021-09-24 21:20:05 -07:00
require ( ' blake.other ' ) . autosession ( )
2021-09-07 17:59:31 -07:00
end
}
2022-07-26 02:24:10 -07:00
use { -- glow: Markdown preview
2021-09-15 21:39:21 -07:00
' ellisonleao/glow.nvim ' ,
ft = { ' md ' , ' markdown ' , }
}
2022-07-26 02:24:10 -07:00
use { -- zen mode: (ZenMode or ZM)
2021-12-02 03:00:51 -08:00
" folke/zen-mode.nvim " ,
config = function ( )
2022-01-20 03:16:39 -08:00
require ( ' blake.other ' ) . zenmode ( )
2022-03-15 00:46:12 -07:00
vim.cmd ' nnoremap <F10> <cmd>ZenMode<CR> '
2022-04-27 17:34:38 -07:00
vim.cmd ' inoremap <F10> <cmd>ZenMode<CR> '
2021-12-02 03:00:51 -08:00
end ,
}
2022-07-26 02:24:10 -07:00
-- use { -- twilight.nvim: dim text outside paragraph or function
2022-01-30 20:05:19 -08:00
-- 'folke/twilight.nvim',
-- config = function()
2022-08-30 13:40:38 -07:00
-- vim.cmd 'cab TW Twilight'
2022-01-30 20:05:19 -08:00
-- require("twilight").setup()
-- end,
-- }
2023-12-23 05:37:12 -08:00
use { -- matchup: Use the percent (%) key for more things
' andymass/vim-matchup ' ,
}
2022-07-26 02:24:10 -07:00
use { -- indentline: Line indent indicators
2022-01-21 17:41:25 -08:00
' lukas-reineke/indent-blankline.nvim ' ,
2021-12-03 01:05:26 -08:00
config = function ( )
2022-01-21 17:41:25 -08:00
require ( ' blake.other ' ) . indent_blankline ( )
2021-12-03 01:05:26 -08:00
end
}
2022-08-25 02:44:19 -07:00
use { -- targets.vim: fix ci' and other things to work better
' wellle/targets.vim ' ,
}
2022-08-13 04:07:58 -07:00
use { -- nvim-tree: File explorer
' kyazdani42/nvim-tree.lua ' ,
requires = { ' kyazdani42/nvim-web-devicons ' } ,
tag = ' nightly ' ,
config = function ( )
require ( " nvim-tree " ) . setup ( {
diagnostics = { enable = true , } ,
} )
end
}
2022-08-17 19:42:37 -07:00
use { -- neogen: annotation generator for neovim
' danymat/neogen ' ,
requires = " nvim-treesitter/nvim-treesitter " ,
config = function ( )
require ( ' neogen ' ) . setup ( {
snippet_engine = " luasnip " ,
} )
local opts = { noremap = true , silent = true }
vim.api . nvim_set_keymap ( " n " , " <Leader>af " , " :lua require('neogen').generate('func')<CR> " , opts )
end
}
2022-08-17 22:23:48 -07:00
use { -- hop.nvim: Jump around files quickly
' phaazon/hop.nvim ' ,
config = function ( )
require ( ' hop ' ) . setup { keys = ' etovxqpdygfblzhckisuran ' }
end
}
2023-05-28 19:29:20 -07:00
---- Language-specific packages
use { -- rust-tools: make nvim a better rust environment
' simrat39/rust-tools.nvim ' ,
requires = {
' mattn/webapi-vim ' , -- allow :RustPlay
} ,
config = function ( )
local rt = require ( " rust-tools " )
rt.setup ( {
server = {
on_attach = function ( _ , bufnr )
-- Hover actions
vim.keymap . set ( " n " , " K " , rt.hover_actions . hover_actions , { buffer = bufnr } )
-- Code action groups
vim.keymap . set ( " n " , " <Leader>a " , rt.code_action_group . code_action_group , { buffer = bufnr } )
end ,
} ,
} )
end
}
use { -- quarto-nvim: tools for writing with quarto
' quarto-dev/quarto-nvim ' ,
requires = {
' jmbuhr/otter.nvim ' , -- execute code in a terminal
} ,
config = function ( )
require ' quarto ' . setup ( {
debug = false ,
closePreviewOnExit = true ,
lspFeatures = {
enabled = true ,
languages = { ' bash ' } ,
chunks = ' curly ' , -- 'curly' or 'all'
diagnostics = {
enabled = true ,
triggers = { " BufWritePost " }
} ,
completion = {
enabled = true ,
} ,
} ,
keymap = {
hover = ' K ' ,
definition = ' gd ' ,
} ,
} )
end
}
2023-12-23 05:37:12 -08:00
use { -- faust-nvim: faust integration
' madskjeldgaard/faust-nvim ' ,
config = function ( )
require ' faust-nvim '
require ' faust-nvim ' . load_snippets ( )
end ,
requires = {
' vijaymarupudi/nvim-fzf ' ,
' L3MON4D3/LuaSnip '
} --,
-- run = require'faust-nvim'.post_install, -- Generate documentation etc (currently doesn't work it seems)
}
2021-09-03 01:18:44 -07:00
-- Conveniences
2022-07-26 02:24:10 -07:00
use { -- sort motion: (gs)
2022-07-13 18:07:07 -07:00
' christoomey/vim-sort-motion ' ,
2022-08-15 01:45:14 -07:00
requires = ' navicore/vissort.vim ' , -- config requires
2022-07-13 18:07:07 -07:00
config = function ( )
vim.cmd [ [
" let g:sort_motion_flags = 'i'
let g : sort_motion_visual_block_command = ' Vissort '
] ]
end ,
2022-08-15 01:45:14 -07:00
}
use { -- vissort: "Visual Sort" - sort based on selected characters
' navicore/vissort.vim ' ,
2022-08-27 15:12:31 -07:00
cmd = ' Vissort ' ,
2022-07-13 18:07:07 -07:00
}
2022-12-16 22:31:43 -08:00
use { -- AdvancedSorters: More ways to sort text - :Sort....
' inkarkat/vim-AdvancedSorters '
}
2022-07-26 02:24:10 -07:00
use { -- ghost: Web browser integration
2021-11-19 18:18:58 -08:00
' raghur/vim-ghost ' ,
2021-11-25 04:32:01 -08:00
opt = true ,
2021-12-02 03:00:51 -08:00
cmd = { ' GhostStart ' , ' GhostInstall ' , ' GhostStop ' , ' GhostSync ' , ' GhostToggleSync ' , } ,
2021-11-19 18:18:58 -08:00
}
2022-07-26 02:24:10 -07:00
use { -- undotree: visual undo tree
2021-09-03 01:18:44 -07:00
' mbbill/undotree ' ,
2021-09-07 01:49:23 -07:00
config = function ( )
2022-08-08 16:36:18 -07:00
vim.api . nvim_set_keymap ( ' n ' , ' <Leader>u ' , ' <cmd>UndotreeToggle<CR> ' , { noremap = true , silent = true , } )
2021-09-07 01:49:23 -07:00
end
2021-09-03 01:18:44 -07:00
}
2022-08-30 13:40:38 -07:00
use { -- macroeditor: edit macros in another window to avoid making LSP mad
' dohsimpson/vim-macroeditor ' ,
config = function ( )
vim.cmd ' cab ME MacroEdit '
end
}
2022-07-26 02:24:10 -07:00
-- use { -- shade.nvim: dim inactive window
2022-01-21 17:41:25 -08:00
-- 'sunjon/shade.nvim',
-- config = function()
-- require'shade'.setup({
-- overlay_opacity = 50,
-- opacity_step = 1,
-- keys = {
-- brightness_up = '<C-Up>',
-- brightness_down = '<C-Down>',
-- toggle = '<Leader>s',
-- }
-- })
-- end
-- }
2022-07-26 02:24:10 -07:00
use { -- nvim-autopairs: automatic quote pairing
2021-11-16 23:26:02 -08:00
' windwp/nvim-autopairs ' ,
config = function ( )
2022-06-22 01:42:34 -07:00
-- If you want insert `(` after select function or method item
local cmp_autopairs = require ( ' nvim-autopairs.completion.cmp ' )
local cmp = require ( ' cmp ' )
cmp.event : on (
' confirm_done ' ,
cmp_autopairs.on_confirm_done ( )
)
require ( ' nvim-autopairs ' ) . setup ( {
2022-08-08 16:36:18 -07:00
check_ts = true ,
map_c_h = true ,
map_c_w = true ,
2022-06-22 01:42:34 -07:00
} )
2022-07-13 18:07:07 -07:00
end ,
2022-08-15 14:34:35 -07:00
requires = { ' hrsh7th/nvim-cmp ' } , -- config requires
2021-11-16 23:26:02 -08:00
}
2022-07-26 02:24:10 -07:00
use { -- ts-autotag: automatically close html tags
2022-06-22 01:42:34 -07:00
' windwp/nvim-ts-autotag ' ,
config = function ( )
require ( ' nvim-ts-autotag ' ) . setup ( )
end
}
2022-07-26 02:24:10 -07:00
use { -- endwise: auto add 'end' keyword when typing loops in various languages
2022-06-22 01:42:34 -07:00
' RRethy/nvim-treesitter-endwise ' ,
config = function ( )
require ( ' nvim-treesitter.configs ' ) . setup {
endwise = {
enable = true ,
} ,
}
end
}
2022-07-26 02:24:10 -07:00
use { -- nvim-align: Align text
2022-07-26 02:21:23 -07:00
' RRethy/nvim-align ' ,
2021-09-26 14:29:44 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- comment.nvim: toggle comments - gb and gc
2022-09-09 00:23:52 -07:00
' numToStr/Comment.nvim ' ,
2022-08-13 01:58:52 -07:00
config = function ( )
require ( ' Comment ' ) . setup {
mappings = {
extra = true ,
}
}
end
}
2022-08-27 15:12:31 -07:00
use { -- ts-context-commentstring: set commentstring based on context from treesitter (two langs in one file)
' JoosepAlviste/nvim-ts-context-commentstring ' ,
2023-12-23 05:37:12 -08:00
requires = { ' nvim-treesitter/nvim-treesitter ' , } ,
2022-08-27 15:12:31 -07:00
}
2023-12-23 05:37:12 -08:00
2022-07-26 02:24:10 -07:00
use { -- vim-rooter: cd to the root of a project when opening a file or folder
2022-07-26 02:21:23 -07:00
' notjedi/nvim-rooter.lua ' ,
}
2022-07-26 02:24:10 -07:00
use { -- splitjoin: switch between single line and multiline versions of code - gJ and gS
2022-07-26 02:21:23 -07:00
' AndrewRadev/splitjoin.vim ' ,
}
2022-08-13 02:03:55 -07:00
use { -- which-key: remind me what that one keybind does again?
' folke/which-key.nvim ' ,
config = function ( )
require ( " which-key " ) . setup ( )
end ,
}
2022-08-14 15:49:06 -07:00
use { -- marks.nvim: Show marks in sign column
' chentoast/marks.nvim ' ,
config = function ( )
require ( ' marks ' ) . setup ( )
end
}
2022-08-17 19:42:37 -07:00
use { -- oscyank: copy text to system clipboard over ssh
' ojroques/vim-oscyank ' ,
config = function ( )
-- Yanking to "+ will yank to system board
2023-04-26 02:19:28 -07:00
vim.cmd [[ autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | execute 'OSCYankRegister +' | endif ]]
2022-08-17 19:42:37 -07:00
end
}
2022-08-19 01:08:55 -07:00
use { -- fixcursorhold: fix neovim bug #12587 - https://github.com/neovim/neovim/issues/12587
' antoinemadec/FixCursorHold.nvim ' ,
}
2022-07-26 02:24:10 -07:00
use { -- rhysd: clever-split: split calculation based on pane dimensions - CS or CleverSplit
2022-07-26 02:21:23 -07:00
' rhysd/clever-split.vim ' ,
config = function ( )
2022-08-30 22:51:10 -07:00
vim.cmd [ [
cab CH CleverHelp
cab CS CleverSplit
] ]
2022-07-26 02:21:23 -07:00
end
}
2022-07-26 02:24:10 -07:00
-- use { -- rhysd: accelerated jk: make j and k move faster by pressing them a lot movement
2022-07-26 02:21:23 -07:00
-- 'rhysd/accelerated-jk',
-- }
2022-07-26 02:24:10 -07:00
use { -- rhysd: committia: better commit editing window
2022-01-21 17:41:25 -08:00
' rhysd/committia.vim ' ,
}
2022-07-26 02:24:10 -07:00
use { -- rhysd: conflict-marker: mark git conflicts - [x, ]x, co, ct, cb, cB, cn
2022-01-21 17:41:25 -08:00
' rhysd/conflict-marker.vim ' ,
}
2022-07-26 02:24:10 -07:00
use { -- lewis6991: spaceless: Strip trailing whitespace as you are editing
2021-12-02 03:00:51 -08:00
' lewis6991/spaceless.nvim ' ,
config = function ( )
require ' spaceless ' . setup ( )
end ,
}
2022-07-26 02:24:10 -07:00
use { -- lewis6991: foldsigns: signcolumn signs on folded lines
2021-12-02 03:00:51 -08:00
' lewis6991/foldsigns.nvim ' ,
config = function ( )
require ( ' foldsigns ' ) . setup ( )
end ,
}
2022-07-26 02:24:10 -07:00
use { -- lewis6991: cleanfold: folds have never looked better
2022-06-05 11:42:12 -07:00
' lewis6991/cleanfold.nvim ' ,
config = function ( )
require ( ' cleanfold ' ) . setup ( )
end ,
}
2022-07-26 02:24:10 -07:00
-- use { -- lewis6991: sattelite: small scroll bar
2022-06-12 05:12:39 -07:00
-- 'lewis6991/satellite.nvim',
-- config = function()
-- require('satellite').setup()
-- vim.cmd [[
-- nnoremap <C-l> <cmd>nohlsearch\|diffupdate\|SatelliteRefresh<CR>
-- inoremap <C-l> <cmd>nohlsearch\|diffupdate\|SatelliteRefresh<CR>
-- ]]
-- end,
-- }
2022-07-26 02:24:10 -07:00
use { -- tpope: surround: surround text with quotes, parens, tags, and more - ys
2022-07-26 02:21:23 -07:00
' tpope/vim-surround ' ,
2021-09-03 01:18:44 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- tpope: fugitive: git integration
2022-07-26 02:21:23 -07:00
' tpope/vim-fugitive ' ,
2022-08-27 15:12:31 -07:00
cmd = ' G ' ,
2021-09-03 01:18:44 -07:00
}
2022-07-26 02:24:10 -07:00
use { -- tpope: repeat: Repeatability for various tpope plugins
2021-09-03 01:18:44 -07:00
' tpope/vim-repeat ' ,
}
2022-07-26 02:24:10 -07:00
use { -- tpope: sleuth: automatically get info about files and apply it to vim (tabs vs spaces, etc)
2022-01-02 17:40:03 -08:00
' tpope/vim-sleuth ' ,
}
2022-08-25 02:46:41 -07:00
use { -- tpope: eunuch: some unix shell commands in vim
' tpope/vim-eunuch ' ,
2022-08-27 15:12:31 -07:00
cmd = { ' Remove ' , ' Unlink ' , ' Delete ' , ' Copy ' , ' Duplicate ' , ' Move ' , ' Rename ' , ' Chmod ' , ' Mkdir ' , ' Mkdir ' , ' Cfind ' , ' Lfind ' , ' Clocate ' , ' Llocate ' , ' SudoEdit ' , ' SudoWrite ' , } ,
2022-08-25 02:46:41 -07:00
}
2022-01-02 17:40:03 -08:00
2021-10-20 10:57:24 -07:00
-- Bootstrap packer if needed {
2022-08-24 04:11:15 -07:00
if ( Packer_bootstrap ) then
2022-08-13 04:13:31 -07:00
print ( ' Please wait for packer to install plugins ' )
2021-10-20 10:57:24 -07:00
require ( ' packer ' ) . sync ( )
2022-08-08 17:16:36 -07:00
end
-- }
2021-11-25 04:32:01 -08:00
end ,
config = {
2022-08-13 04:20:43 -07:00
-- Make packer a floating window with single border
display = {
open_fn = function ( )
return require ( ' packer.util ' ) . float ( { border = ' single ' } )
end
} ,
2022-08-13 04:07:58 -07:00
-- Move to lua dir so impatient.nvim can cache it
compile_path = vim.fn . stdpath ( ' config ' ) .. ' /lua/packer_compiled.lua ' ,
-- Don't ask before removing plugins
autoremove = true ,
2022-08-14 22:41:31 -07:00
-- Limit max jobs to avoid getting killed on low-end hardware
2022-08-24 04:11:50 -07:00
max_jobs = Packer_max_jobs ,
2022-08-27 15:12:31 -07:00
profile = {
enable = true ,
} ,
2021-11-25 04:32:01 -08:00
} } )
2021-09-03 01:18:44 -07:00
2022-08-13 04:07:58 -07:00
-- how to align all plugin descriptions: select all plugins in visual line, :'<,'>Align \(.\+use { -- .\+: \+\)\@<=[^ ][^:]\+$
2021-11-25 04:32:01 -08:00
-- vim:fdm=marker:fmr={,}:fdl=1:expandtab:tabstop=3:sw=3