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

@ -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

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

View file

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

View file

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

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

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