dotfiles/nvim/.config/nvim/lua/plugins.lua
Sanchayan Maity be02b5ead7 nvim: Switch to nvim-cmp
nvim-compe has been deprecated. While we tried to make it a few days
without any completion support, in javascript/typescript could not get
the default omnicompletion to work at all. It is possible that this
could be due to nvim-lsp-ts-utils/null-ls but who is gonna debug.

Also tried MUcomplete but it just would not work. There are open issues
on this. See https://github.com/neovim/neovim/issues/12390 and also
https://github.com/lifepillar/vim-mucomplete/issues/179.

So here we are with nvim-cmp. Some observations in comparison to compe
before. Using buffer completion seems not possible as most of the times
LSP completion items then do not turn up. Do not know if this is server
specific but at least it is the case with Rust. compe seemed better
performance wise especially in tsserver and considering the buffer
problem mentioned above. Also, even with vsnip added as the completion
source can't seem to get any snippet specific completions working.

Could have ditched all completion support if I did not have to use
tsserver but need it for work currently. So we will stick to enabling
this and hopefully it improves in future.

Fuck nodejs, javascript and typescript.

For references see,
https://github.com/kristijanhusak/neovim-config
https://github.com/sQVe/dotfiles/tree/master/config/nvim
2021-09-27 16:29:18 +05:30

136 lines
3.2 KiB
Lua

-- Add the in built Cfilter plugin. Replaces QFGrep.
vim.cmd 'packadd cfilter'
vim.cmd 'packadd packer.nvim'
local init = function ()
use {'wbthomason/packer.nvim', opt = true}
-- Vertical Motion
use 'justinmk/vim-sneak'
-- Search
use {
'junegunn/fzf',
run = './install --bin'
}
use 'junegunn/fzf.vim'
use 'wincent/ferret'
use 'bronson/vim-visual-star-search'
-- Remove extraneous whitespace when edit mode is exited
use 'ntpeters/vim-better-whitespace'
-- Manage Project sessions
use 'thaerkh/vim-workspace'
-- For autocompletion
use {
'hrsh7th/nvim-cmp',
requires = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-vsnip',
'hrsh7th/cmp-path',
'onsails/lspkind-nvim'
}
}
-- Git support
use 'lewis6991/gitsigns.nvim'
use 'tpope/vim-fugitive'
use 'rhysd/git-messenger.vim'
use 'whiteinge/diffconflicts'
use 'sindrets/diffview.nvim'
-- Boost vim command line mode
use 'vim-utils/vim-husk'
-- Formatting
use {
'sbdchd/neoformat',
cmd = 'Neoformat'
}
-- Run things async
use 'hauleth/asyncdo.vim'
-- Quickfix
use 'yssl/QFEnter'
use 'ronakg/quickr-cscope.vim'
use 'milkypostman/vim-togglelist'
use 'chengzeyi/fzf-preview.vim'
-- Text Object plugins
use {
'wellle/targets.vim',
'tpope/vim-surround',
'tommcdo/vim-exchange',
'chaoren/vim-wordmotion',
'kana/vim-textobj-user',
'kana/vim-textobj-indent',
'kana/vim-textobj-entire',
'glts/vim-textobj-indblock',
'idbrii/textobj-word-column.vim',
'danidiaz/vim-textobj-do-block'
}
-- Tim pope essentials
use {
'tpope/vim-commentary',
'tpope/vim-repeat',
'tpope/vim-sleuth'
}
-- Directory viewer
use 'justinmk/vim-dirvish'
-- Show leader key bindings
use 'folke/which-key.nvim'
-- Toggle terminal
use 'voldikss/vim-floaterm'
-- Take care of sudo
use 'lambdalisue/suda.vim'
-- Alignment
use 'junegunn/vim-easy-align'
use 'nvim-lua/plenary.nvim'
use {
'jose-elias-alvarez/nvim-lsp-ts-utils',
requires = { 'jose-elias-alvarez/null-ls.nvim' }
}
-- LSP
use {
'neovim/nvim-lspconfig',
'ray-x/lsp_signature.nvim',
'kosayoda/nvim-lightbulb',
}
-- Language support & syntax highlighting
use 'simrat39/rust-tools.nvim'
-- Coq
use {
'whonore/Coqtail',
'jlapolla/vim-coq-plugin'
}
-- treesitter based syntax highlighting
use {
'nvim-treesitter/nvim-treesitter-textobjects',
requires = { 'nvim-treesitter/nvim-treesitter' },
config = "require('treesitter')",
}
use 'nvim-treesitter/playground'
-- All writing needs
use 'lervag/vimtex'
use 'vim-pandoc/vim-pandoc'
use 'vim-pandoc/vim-pandoc-syntax'
-- Dhall
use 'vmchale/dhall-vim'
-- Other syntax highlighting support
use 'inkarkat/SyntaxAttr.vim'
-- For statusline
use {
'NTBBloodbath/galaxyline.nvim',
requires = { 'kyazdani42/nvim-web-devicons' }
}
-- Marks and registers
use {
'kshenoy/vim-signature',
}
-- Snippets
use {
'rafamadriz/friendly-snippets',
'hrsh7th/vim-vsnip'
}
-- GDB support
use 'sakhnik/nvim-gdb'
-- For files with ANSI escape sequences
use 'powerman/vim-plugin-AnsiEsc'
end
return require('packer').startup(init)