nvim: Move to packer
This commit is contained in:
parent
21167993bf
commit
cbd37c1856
9 changed files with 171 additions and 119 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,5 +1,9 @@
|
||||||
tmux/.tmux/resurrect
|
tmux/.tmux/resurrect
|
||||||
nvim/.config/nvim/.netrwhist
|
nvim/.config/nvim/.netrwhist
|
||||||
nvim/.local/share/nvim/site/pack/paqs/start
|
nvim/.config/nvim/plugin/packer_compiled.vim
|
||||||
|
nvim/.local/share/nvim/site/pack/packer/start
|
||||||
|
nvim/.local/share/nvim/site/pack/packer/opt/ghcid
|
||||||
|
nvim/.local/share/nvim/site/pack/packer/opt/git-messenger.vim
|
||||||
|
nvim/.local/share/nvim/site/pack/packer/opt/neoformat
|
||||||
*.patch
|
*.patch
|
||||||
*.diff
|
*.diff
|
||||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -19,6 +19,6 @@
|
||||||
[submodule "tmux/.tmux/plugins/tmux-battery"]
|
[submodule "tmux/.tmux/plugins/tmux-battery"]
|
||||||
path = tmux/.tmux/plugins/tmux-battery
|
path = tmux/.tmux/plugins/tmux-battery
|
||||||
url = https://github.com/tmux-plugins/tmux-battery
|
url = https://github.com/tmux-plugins/tmux-battery
|
||||||
[submodule "nvim/.local/share/nvim/site/pack/paqs/opt/paq-nvim"]
|
[submodule "nvim/.local/share/nvim/site/pack/packer/opt/packer.nvim"]
|
||||||
path = nvim/.local/share/nvim/site/pack/paqs/opt/paq-nvim
|
path = nvim/.local/share/nvim/site/pack/packer/opt/packer.nvim
|
||||||
url = https://github.com/savq/paq-nvim
|
url = https://github.com/wbthomason/packer.nvim
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
nmap <buffer> pg :PaqUpdate<CR>
|
|
||||||
nmap <buffer> pd :PaqInstall<CR>
|
|
||||||
nmap <buffer> pw :PaqClean<CR>
|
|
||||||
nmap <buffer> pr :so %<CR>
|
|
2
nvim/.config/nvim/after/plugin/_load_lua.vim
Normal file
2
nvim/.config/nvim/after/plugin/_load_lua.vim
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
let s:load_dir = expand('<sfile>:p:h:h:h')
|
||||||
|
exec printf('luafile %s/lua/init.lua', s:load_dir)
|
|
@ -96,25 +96,7 @@ vim.api.nvim_command('set backspace=indent,eol,start')
|
||||||
vim.api.nvim_command('set diffopt=filler,internal,algorithm:histogram,indent-heuristic')
|
vim.api.nvim_command('set diffopt=filler,internal,algorithm:histogram,indent-heuristic')
|
||||||
-- Load out custom colorscheme
|
-- Load out custom colorscheme
|
||||||
vim.api.nvim_command('colorscheme yolokai')
|
vim.api.nvim_command('colorscheme yolokai')
|
||||||
-- Add the in built Cfilter plugin. Replaces QFGrep.
|
|
||||||
vim.api.nvim_command('packadd cfilter')
|
|
||||||
|
|
||||||
-- Add other lua configs or plugins
|
-- Add other lua configs or plugins
|
||||||
require 'autocmd'
|
require 'autocmd'
|
||||||
require 'keymappings'
|
require 'keymappings'
|
||||||
require 'plugins'
|
|
||||||
require 'lsp'
|
|
||||||
require 'treesitter'
|
|
||||||
-- Load plugin specific settings
|
|
||||||
require 'modules.asyncdo'
|
|
||||||
require 'modules.better-whitespace'
|
|
||||||
require 'modules.completion'
|
|
||||||
require 'modules.diagnostic'
|
|
||||||
require 'modules.floaterm'
|
|
||||||
require 'modules.fzf'
|
|
||||||
require 'modules.fzf-preview'
|
|
||||||
require 'modules.gitsigns'
|
|
||||||
require 'modules.sneak'
|
|
||||||
require 'modules.togglelist'
|
|
||||||
require 'modules.which_key'
|
|
||||||
require 'modules.workspace'
|
|
||||||
|
|
|
@ -1,94 +1,161 @@
|
||||||
vim.cmd 'packadd paq-nvim'
|
-- Add the in built Cfilter plugin. Replaces QFGrep.
|
||||||
local paq = require'paq-nvim'.paq
|
vim.cmd 'packadd cfilter'
|
||||||
|
vim.cmd 'packadd packer.nvim'
|
||||||
|
|
||||||
paq {'savq/paq-nvim', opt = true}
|
local init = function ()
|
||||||
|
use {'wbthomason/packer.nvim', opt = true}
|
||||||
-- Vertical Motion
|
-- Vertical Motion
|
||||||
paq 'justinmk/vim-sneak'
|
use {
|
||||||
|
'justinmk/vim-sneak',
|
||||||
|
config = "require('modules.sneak')"
|
||||||
|
}
|
||||||
-- Search
|
-- Search
|
||||||
paq 'junegunn/fzf'
|
use {
|
||||||
paq 'junegunn/fzf.vim'
|
'junegunn/fzf',
|
||||||
paq 'PeterRincker/vim-searchlight'
|
run = function()
|
||||||
paq 'wincent/ferret'
|
vim.fn['fzf#install'](0)
|
||||||
paq 'lambdalisue/reword.vim'
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'junegunn/fzf.vim',
|
||||||
|
config = "require('modules.fzf')"
|
||||||
|
}
|
||||||
|
use 'PeterRincker/vim-searchlight'
|
||||||
|
use 'wincent/ferret'
|
||||||
|
use 'lambdalisue/reword.vim'
|
||||||
-- Remove extraneous whitespace when edit mode is exited
|
-- Remove extraneous whitespace when edit mode is exited
|
||||||
paq 'ntpeters/vim-better-whitespace'
|
use {
|
||||||
|
'ntpeters/vim-better-whitespace',
|
||||||
|
config = "require('modules.better-whitespace')"
|
||||||
|
}
|
||||||
-- Manage Project sessions
|
-- Manage Project sessions
|
||||||
paq 'thaerkh/vim-workspace'
|
use {
|
||||||
|
'thaerkh/vim-workspace',
|
||||||
|
config = "require('modules.workspace')"
|
||||||
|
}
|
||||||
-- For autocompletion
|
-- For autocompletion
|
||||||
paq 'nvim-lua/completion-nvim'
|
use {
|
||||||
paq 'steelsojka/completion-buffers'
|
'nvim-lua/completion-nvim',
|
||||||
|
config = "require('modules.completion')"
|
||||||
|
}
|
||||||
|
use 'steelsojka/completion-buffers'
|
||||||
-- For tmux
|
-- For tmux
|
||||||
paq 'tmux-plugins/vim-tmux-focus-events'
|
use 'tmux-plugins/vim-tmux-focus-events'
|
||||||
-- Git support
|
-- Git support
|
||||||
paq 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
paq 'lewis6991/gitsigns.nvim'
|
use {
|
||||||
paq 'lambdalisue/gina.vim'
|
'lewis6991/gitsigns.nvim',
|
||||||
paq 'rhysd/git-messenger.vim'
|
config = "require('modules.gitsigns')",
|
||||||
paq 'rhysd/conflict-marker.vim'
|
branch = 'main'
|
||||||
paq 'salcode/vim-interactive-rebase-reverse'
|
}
|
||||||
|
use 'lambdalisue/gina.vim'
|
||||||
|
use {
|
||||||
|
'rhysd/git-messenger.vim',
|
||||||
|
cmd = 'GitMessenger'
|
||||||
|
}
|
||||||
|
use 'rhysd/conflict-marker.vim'
|
||||||
|
use 'salcode/vim-interactive-rebase-reverse'
|
||||||
-- Boost vim command line mode
|
-- Boost vim command line mode
|
||||||
paq 'vim-utils/vim-husk'
|
use 'vim-utils/vim-husk'
|
||||||
-- Rainbow Parentheses
|
-- Rainbow Parentheses
|
||||||
paq 'luochen1990/rainbow'
|
use 'luochen1990/rainbow'
|
||||||
-- Formatting
|
-- Formatting
|
||||||
paq 'sbdchd/neoformat'
|
use {
|
||||||
|
'sbdchd/neoformat',
|
||||||
|
cmd = 'Neoformat'
|
||||||
|
}
|
||||||
-- Run things async
|
-- Run things async
|
||||||
paq 'hauleth/asyncdo.vim'
|
use {
|
||||||
|
'hauleth/asyncdo.vim',
|
||||||
|
config = "require('modules.asyncdo')"
|
||||||
|
}
|
||||||
-- Quickfix
|
-- Quickfix
|
||||||
paq 'ronakg/quickr-cscope.vim'
|
use 'ronakg/quickr-cscope.vim'
|
||||||
paq 'milkypostman/vim-togglelist'
|
use {
|
||||||
paq 'yssl/QFEnter'
|
'milkypostman/vim-togglelist',
|
||||||
paq 'chengzeyi/fzf-preview.vim'
|
config = "require('modules.togglelist')"
|
||||||
|
}
|
||||||
|
use 'yssl/QFEnter'
|
||||||
|
use {
|
||||||
|
'chengzeyi/fzf-preview.vim',
|
||||||
|
config = "require('modules.fzf-preview')"
|
||||||
|
}
|
||||||
-- Text Object plugins
|
-- Text Object plugins
|
||||||
paq 'wellle/targets.vim'
|
use {
|
||||||
paq 'tpope/vim-surround'
|
'wellle/targets.vim',
|
||||||
paq 'coderifous/textobj-word-column.vim'
|
'tpope/vim-surround',
|
||||||
paq 'tommcdo/vim-exchange'
|
'coderifous/textobj-word-column.vim',
|
||||||
paq 'chaoren/vim-wordmotion'
|
'tommcdo/vim-exchange',
|
||||||
|
'chaoren/vim-wordmotion'
|
||||||
|
}
|
||||||
-- Tim pope essentials
|
-- Tim pope essentials
|
||||||
paq 'tpope/vim-commentary'
|
use {
|
||||||
paq 'tpope/vim-repeat'
|
'tpope/vim-commentary',
|
||||||
paq 'tpope/vim-sleuth'
|
'tpope/vim-repeat',
|
||||||
|
'tpope/vim-sleuth'
|
||||||
|
}
|
||||||
-- Show indentation levels
|
-- Show indentation levels
|
||||||
paq 'Yggdroot/indentLine'
|
use 'Yggdroot/indentLine'
|
||||||
-- Smooth scrolling
|
-- Smooth scrolling
|
||||||
paq 'psliwka/vim-smoothie'
|
use 'psliwka/vim-smoothie'
|
||||||
-- Scrollbar
|
-- Scrollbar
|
||||||
paq 'Xuyuanp/scrollbar.nvim'
|
use 'Xuyuanp/scrollbar.nvim'
|
||||||
-- Directory viewer
|
-- Directory viewer
|
||||||
paq 'justinmk/vim-dirvish'
|
use 'justinmk/vim-dirvish'
|
||||||
-- Show leader key bindings
|
-- Show leader key bindings
|
||||||
paq 'liuchengxu/vim-which-key'
|
use {
|
||||||
|
'liuchengxu/vim-which-key',
|
||||||
|
config = "require('modules.which_key')"
|
||||||
|
}
|
||||||
-- Clipboard
|
-- Clipboard
|
||||||
paq 'christoomey/vim-system-copy'
|
use 'christoomey/vim-system-copy'
|
||||||
-- Toggle terminal
|
-- Toggle terminal
|
||||||
paq 'voldikss/vim-floaterm'
|
use {
|
||||||
paq 'lambdalisue/edita.vim'
|
'voldikss/vim-floaterm',
|
||||||
|
config = "require('modules.floaterm')"
|
||||||
|
}
|
||||||
|
use 'lambdalisue/edita.vim'
|
||||||
-- Take care of sudo
|
-- Take care of sudo
|
||||||
paq 'lambdalisue/suda.vim'
|
use 'lambdalisue/suda.vim'
|
||||||
-- LSP
|
-- LSP
|
||||||
paq 'neovim/nvim-lspconfig'
|
use {
|
||||||
paq 'nvim-lua/diagnostic-nvim'
|
'neovim/nvim-lspconfig',
|
||||||
paq 'nvim-lua/lsp-status.nvim'
|
config = "require('lsp')",
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'nvim-lua/diagnostic-nvim',
|
||||||
|
config = "require('modules.diagnostic')"
|
||||||
|
}
|
||||||
|
use 'nvim-lua/lsp-status.nvim'
|
||||||
-- Language support & syntax highlighting
|
-- Language support & syntax highlighting
|
||||||
-- Haskell
|
-- Haskell
|
||||||
paq 'neovimhaskell/haskell-vim'
|
use {
|
||||||
paq 'Twinside/vim-hoogle'
|
'neovimhaskell/haskell-vim',
|
||||||
paq 'godlygeek/tabular'
|
'Twinside/vim-hoogle',
|
||||||
paq 'ndmitchell/ghcid'
|
'godlygeek/tabular',
|
||||||
|
ft = 'haskell'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'ndmitchell/ghcid',
|
||||||
|
rtp = 'plugins/nvim',
|
||||||
|
ft = 'haskell'
|
||||||
|
}
|
||||||
-- For C, Lua and Rust
|
-- For C, Lua and Rust
|
||||||
paq 'nvim-treesitter/nvim-treesitter'
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
config = "require('treesitter')",
|
||||||
|
}
|
||||||
-- LaTeX
|
-- LaTeX
|
||||||
paq 'lervag/vimtex'
|
use 'lervag/vimtex'
|
||||||
-- Dhall & nix
|
-- Dhall & nix
|
||||||
paq 'vmchale/dhall-vim'
|
use 'vmchale/dhall-vim'
|
||||||
paq 'LnL7/vim-nix'
|
use 'LnL7/vim-nix'
|
||||||
-- Other syntax highlighting support
|
-- Other syntax highlighting support
|
||||||
paq 'georgewitteman/vim-fish'
|
use 'georgewitteman/vim-fish'
|
||||||
paq 'elzr/vim-json'
|
use 'elzr/vim-json'
|
||||||
paq 'lifepillar/pgsql.vim'
|
use 'lifepillar/pgsql.vim'
|
||||||
paq 'mtdl9/vim-log-highlighting'
|
use 'mtdl9/vim-log-highlighting'
|
||||||
paq 'martinda/Jenkinsfile-vim-syntax'
|
use 'martinda/Jenkinsfile-vim-syntax'
|
||||||
|
end
|
||||||
|
|
||||||
-- Without this lua plugins like LSP or treesitter won't work
|
return require('packer').startup(init)
|
||||||
vim.cmd [[packloadall]]
|
|
||||||
|
|
1
nvim/.config/nvim/plugin/plugins.vim
Normal file
1
nvim/.config/nvim/plugin/plugins.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
execute 'luafile ' . stdpath('config') . '/lua/plugins.lua'
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 2aba863c46e786eb05198040773c593851d773d0
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 65bb54b1fee23ec7e0c2416c34efd63e0fcb3e48
|
|
Loading…
Reference in a new issue