nvim: Move to packer

This commit is contained in:
Sanchayan Maity 2020-10-28 19:03:37 +05:30
parent 21167993bf
commit cbd37c1856
9 changed files with 171 additions and 119 deletions

6
.gitignore vendored
View file

@ -1,5 +1,9 @@
tmux/.tmux/resurrect
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
*.diff

6
.gitmodules vendored
View file

@ -19,6 +19,6 @@
[submodule "tmux/.tmux/plugins/tmux-battery"]
path = tmux/.tmux/plugins/tmux-battery
url = https://github.com/tmux-plugins/tmux-battery
[submodule "nvim/.local/share/nvim/site/pack/paqs/opt/paq-nvim"]
path = nvim/.local/share/nvim/site/pack/paqs/opt/paq-nvim
url = https://github.com/savq/paq-nvim
[submodule "nvim/.local/share/nvim/site/pack/packer/opt/packer.nvim"]
path = nvim/.local/share/nvim/site/pack/packer/opt/packer.nvim
url = https://github.com/wbthomason/packer.nvim

View file

@ -1,4 +0,0 @@
nmap <buffer> pg :PaqUpdate<CR>
nmap <buffer> pd :PaqInstall<CR>
nmap <buffer> pw :PaqClean<CR>
nmap <buffer> pr :so %<CR>

View 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)

View file

@ -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')
-- Load out custom colorscheme
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
require 'autocmd'
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'

View file

@ -1,94 +1,161 @@
vim.cmd 'packadd paq-nvim'
local paq = require'paq-nvim'.paq
-- Add the in built Cfilter plugin. Replaces QFGrep.
vim.cmd 'packadd cfilter'
vim.cmd 'packadd packer.nvim'
paq {'savq/paq-nvim', opt = true}
-- Vertical Motion
paq 'justinmk/vim-sneak'
-- Search
paq 'junegunn/fzf'
paq 'junegunn/fzf.vim'
paq 'PeterRincker/vim-searchlight'
paq 'wincent/ferret'
paq 'lambdalisue/reword.vim'
-- Remove extraneous whitespace when edit mode is exited
paq 'ntpeters/vim-better-whitespace'
-- Manage Project sessions
paq 'thaerkh/vim-workspace'
-- For autocompletion
paq 'nvim-lua/completion-nvim'
paq 'steelsojka/completion-buffers'
-- For tmux
paq 'tmux-plugins/vim-tmux-focus-events'
-- Git support
paq 'nvim-lua/plenary.nvim'
paq 'lewis6991/gitsigns.nvim'
paq 'lambdalisue/gina.vim'
paq 'rhysd/git-messenger.vim'
paq 'rhysd/conflict-marker.vim'
paq 'salcode/vim-interactive-rebase-reverse'
-- Boost vim command line mode
paq 'vim-utils/vim-husk'
-- Rainbow Parentheses
paq 'luochen1990/rainbow'
-- Formatting
paq 'sbdchd/neoformat'
-- Run things async
paq 'hauleth/asyncdo.vim'
-- Quickfix
paq 'ronakg/quickr-cscope.vim'
paq 'milkypostman/vim-togglelist'
paq 'yssl/QFEnter'
paq 'chengzeyi/fzf-preview.vim'
-- Text Object plugins
paq 'wellle/targets.vim'
paq 'tpope/vim-surround'
paq 'coderifous/textobj-word-column.vim'
paq 'tommcdo/vim-exchange'
paq 'chaoren/vim-wordmotion'
-- Tim pope essentials
paq 'tpope/vim-commentary'
paq 'tpope/vim-repeat'
paq 'tpope/vim-sleuth'
-- Show indentation levels
paq 'Yggdroot/indentLine'
-- Smooth scrolling
paq 'psliwka/vim-smoothie'
-- Scrollbar
paq 'Xuyuanp/scrollbar.nvim'
-- Directory viewer
paq 'justinmk/vim-dirvish'
-- Show leader key bindings
paq 'liuchengxu/vim-which-key'
-- Clipboard
paq 'christoomey/vim-system-copy'
-- Toggle terminal
paq 'voldikss/vim-floaterm'
paq 'lambdalisue/edita.vim'
-- Take care of sudo
paq 'lambdalisue/suda.vim'
-- LSP
paq 'neovim/nvim-lspconfig'
paq 'nvim-lua/diagnostic-nvim'
paq 'nvim-lua/lsp-status.nvim'
-- Language support & syntax highlighting
-- Haskell
paq 'neovimhaskell/haskell-vim'
paq 'Twinside/vim-hoogle'
paq 'godlygeek/tabular'
paq 'ndmitchell/ghcid'
-- For C, Lua and Rust
paq 'nvim-treesitter/nvim-treesitter'
-- LaTeX
paq 'lervag/vimtex'
-- Dhall & nix
paq 'vmchale/dhall-vim'
paq 'LnL7/vim-nix'
-- Other syntax highlighting support
paq 'georgewitteman/vim-fish'
paq 'elzr/vim-json'
paq 'lifepillar/pgsql.vim'
paq 'mtdl9/vim-log-highlighting'
paq 'martinda/Jenkinsfile-vim-syntax'
local init = function ()
use {'wbthomason/packer.nvim', opt = true}
-- Vertical Motion
use {
'justinmk/vim-sneak',
config = "require('modules.sneak')"
}
-- Search
use {
'junegunn/fzf',
run = function()
vim.fn['fzf#install'](0)
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
use {
'ntpeters/vim-better-whitespace',
config = "require('modules.better-whitespace')"
}
-- Manage Project sessions
use {
'thaerkh/vim-workspace',
config = "require('modules.workspace')"
}
-- For autocompletion
use {
'nvim-lua/completion-nvim',
config = "require('modules.completion')"
}
use 'steelsojka/completion-buffers'
-- For tmux
use 'tmux-plugins/vim-tmux-focus-events'
-- Git support
use 'nvim-lua/plenary.nvim'
use {
'lewis6991/gitsigns.nvim',
config = "require('modules.gitsigns')",
branch = 'main'
}
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
use 'vim-utils/vim-husk'
-- Rainbow Parentheses
use 'luochen1990/rainbow'
-- Formatting
use {
'sbdchd/neoformat',
cmd = 'Neoformat'
}
-- Run things async
use {
'hauleth/asyncdo.vim',
config = "require('modules.asyncdo')"
}
-- Quickfix
use 'ronakg/quickr-cscope.vim'
use {
'milkypostman/vim-togglelist',
config = "require('modules.togglelist')"
}
use 'yssl/QFEnter'
use {
'chengzeyi/fzf-preview.vim',
config = "require('modules.fzf-preview')"
}
-- Text Object plugins
use {
'wellle/targets.vim',
'tpope/vim-surround',
'coderifous/textobj-word-column.vim',
'tommcdo/vim-exchange',
'chaoren/vim-wordmotion'
}
-- Tim pope essentials
use {
'tpope/vim-commentary',
'tpope/vim-repeat',
'tpope/vim-sleuth'
}
-- Show indentation levels
use 'Yggdroot/indentLine'
-- Smooth scrolling
use 'psliwka/vim-smoothie'
-- Scrollbar
use 'Xuyuanp/scrollbar.nvim'
-- Directory viewer
use 'justinmk/vim-dirvish'
-- Show leader key bindings
use {
'liuchengxu/vim-which-key',
config = "require('modules.which_key')"
}
-- Clipboard
use 'christoomey/vim-system-copy'
-- Toggle terminal
use {
'voldikss/vim-floaterm',
config = "require('modules.floaterm')"
}
use 'lambdalisue/edita.vim'
-- Take care of sudo
use 'lambdalisue/suda.vim'
-- LSP
use {
'neovim/nvim-lspconfig',
config = "require('lsp')",
}
use {
'nvim-lua/diagnostic-nvim',
config = "require('modules.diagnostic')"
}
use 'nvim-lua/lsp-status.nvim'
-- Language support & syntax highlighting
-- Haskell
use {
'neovimhaskell/haskell-vim',
'Twinside/vim-hoogle',
'godlygeek/tabular',
ft = 'haskell'
}
use {
'ndmitchell/ghcid',
rtp = 'plugins/nvim',
ft = 'haskell'
}
-- For C, Lua and Rust
use {
'nvim-treesitter/nvim-treesitter',
config = "require('treesitter')",
}
-- LaTeX
use 'lervag/vimtex'
-- Dhall & nix
use 'vmchale/dhall-vim'
use 'LnL7/vim-nix'
-- Other syntax highlighting support
use 'georgewitteman/vim-fish'
use 'elzr/vim-json'
use 'lifepillar/pgsql.vim'
use 'mtdl9/vim-log-highlighting'
use 'martinda/Jenkinsfile-vim-syntax'
end
-- Without this lua plugins like LSP or treesitter won't work
vim.cmd [[packloadall]]
return require('packer').startup(init)

View file

@ -0,0 +1 @@
execute 'luafile ' . stdpath('config') . '/lua/plugins.lua'

@ -0,0 +1 @@
Subproject commit 2aba863c46e786eb05198040773c593851d773d0

@ -1 +0,0 @@
Subproject commit 65bb54b1fee23ec7e0c2416c34efd63e0fcb3e48