plugin alternatives
autocompletion
[!NOTE|label:references:]
- * neoclide/coc.nvim
- * hrsh7th/nvim-cmp | Nvim-cmp configuration for auto-completion
- * ms-jpq/coq_nvim
- @ nvim-lua/completion-nvim
- Shougo/deoplete.nvim | Shougo/ddc.vim
- ycm-core/YouCompleteMe
- prabirshrestha/asyncomplete.vim
- Shougo/ddc.vim
vim-easycomplete
[!NOTE|label:references:]
language server protocol
[!NOTE]
- * neovim/nvim-lspconfig
- * hrsh7th/cmp-nvim-lsp
- prabirshrestha/vim-lsp
- rhysd/vim-lsp-ale
- mfussenegger/nvim-lint
- mattn/vim-lsp-settings
- ycm-core/lsp-examples
- jose-elias-alvarez/null-ls.nvim
snippets
- SirVer/UltiSnips | thomasfaingnaert/vim-lsp-ultisnips
- Shougo/neosnippet.vim | thomasfaingnaert/vim-lsp-neosnippet
L3MON4D3/LuaSnip | rafamadriz/friendly-snippets | Neovim setting up snippets with luasnip | dotfiles/nvim/lua/config/snippets.lua | LuaSnip/Examples/snippets.lua
" ~/.vimrc Plug 'L3MON4D3/LuaSnip', {'tag': 'v2.2.0', 'do': 'make install_jsregexp'} " L3MON4D3/LuaSnip imap <silent><expr> <Tab> luasnip#expand_or_jumpable() ? '<Plug>luasnip-expand-or-jump' : '<Tab>' inoremap <silent> <S-Tab> <cmd>lua require'luasnip'.jump(-1)<Cr> snoremap <silent> <Tab> <cmd>lua require('luasnip').jump(1)<Cr> snoremap <silent> <S-Tab> <cmd>lua require('luasnip').jump(-1)<Cr> imap <silent><expr> <C-E> luasnip#choice_active() ? '<Plug>luasnip-next-choice' : '<C-E>' smap <silent><expr> <C-E> luasnip#choice_active() ? '<Plug>luasnip-next-choice' : '<C-E>'
-- init.lua require("luasnip").config.setup { updateevents = "TextChanged,TextChangedI", store_selection_keys = "<Tab>", } require("config.snippets") -- require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.vim/snippet/groovy.lua" } })
cryptmethod
comments
programming
williamboman/nvim-lsp-installer
[!NOTE|label:references:]
- #848 - Spawning language server with cmd: a-language-server failed. The language server is either not installed, missing from PATH, or not executable.
- #17354 - Spawning language server with cmd: pyright-langserver failed. The language server is either not installed, missing from PATH, or not executable.
$ mkdir -p ~/.cache/nvim/
# show all available packages
:LspInstall <TAB>
:LspInstall <package>
" i.e.:
:LspInstall groovyls
:LspInstallInfo
:LspPrintInstalled
:LspUninstall <package>
neovim/nvim-lspconfig
Plug 'neovim/nvim-lspconfig'
- debug
:LspInfo :LspLog
manual install lsp
[!NOTE]
- williamboman/nvim-lsp-installer install lsp via
:LspInstall
-
$ mkdir -p ~/.vim/lsp $ git clone https://github.com/microsoft/vscode-gradle.git ~/.vim/lsp/vscode-gradle && cd $_ $ ./gradlew installDist $ sudo ln -sf /opt/lsp/gradle-language-server/build/install/gradle-language-server/bin/gradle-language-server /usr/local/bin/ $ which -a gradle-language-server /usr/local/bin/gradle-language-server # details for offline install $ la ~/.gradle/wrapper/dists/gradle-8.5-bin/5t9huq95ubn472n8rpzujfbqh/ total 4.0K -rw-rw-r-- 1 marslo marslo 0 Jan 15 19:58 gradle-8.5-bin.zip.lck drwxrwxr-x 5 marslo marslo 4.0K Jan 15 19:58 gradle-8.5 -rw-rw-r-- 1 marslo marslo 0 Jan 15 19:58 gradle-8.5-bin.zip.ok
require'lspconfig'.gradle_ls.setup { filetypes = { 'groovy', 'Jenkinsfile' } }
groovyls
GroovyLanguageServer/groovy-language-server
# java has to be less than jdk 19 $ brew install openjdk@17 $ export JAVA_HOME='/usr/local/opt/openjdk@17' $ export PATH=${JAVA_HOME}/bin:${PATH} $ export CPPFLAGS="-I${JAVA_HOME}/include ${CPPFLAGS}" $ git clone git@github.com:GroovyLanguageServer/groovy-language-server.git $ ./gradew build # run $ git@github.com:GroovyLanguageServer/groovy-language-server.git
-
[!NOTE|label:@deprecated] using gradlels instead of groovyls
- full ycm-core/lsp-examples list
Plug 'ycm-core/lsp-examples', { 'do': 'python3 install.py --enable-groovy --enable-yaml --enable-bash --enable-json --enable-python --enable-lua --enable-docker' }
# .vimrc Plug 'ycm-core/lsp-examples', { 'do': 'python3 install.py --enable-groovy' } # ~/.config/nvim/init.lua require'lspconfig'.groovyls.setup{ filetypes = { 'groovy', 'Jenkinsfile' }, cmd = { "java", "-jar", "~/.vim/plugged/lsp-examples/groovy/groovy-language-server/build/libs/groovy-language-server-all.jar" }, }
- full ycm-core/lsp-examples list
-
$ npm install -g @ansible/ansible-language-server
# ~/.config/nvim/init.lua require'lspconfig'.ansiblels.setup{}
-
$ npm i -g bash-language-server
# ~/.config/nvim/init.lua require'lspconfig'.bashls.setup{}
-
$ pip install cmake-language-server
# ~/.config/nvim/init.lua require'lspconfig'.cmake.setup{}
-
$ npm i -g vscode-langservers-extracted
# ~/.config/nvim/init.lua local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true require'lspconfig'.cssls.setup { capabilities = capabilities, } require'lspconfig'.cssls.setup{}
-
$ npm install -g dockerfile-language-server-nodejs
# ~/.config/nvim/init.lua require'lspconfig'.dockerls.setup{}
-
[!NOTE|label:references:]
$ pip install python-lsp-server $ sudo npm install -g pyright
require'lspconfig'.pylsp.setup {}
-
$ npm install -g vim-language-server
require'lspconfig'.vimls.setup{}
-
$ npm install -g yaml-language-server
require'lspconfig'.yamlls.setup{}
tpope/vim-commentary
" tpope/vim-commentary
map <C-/> gcc
map <leader>x gcc
imap <C-/> <Esc><Plug>CommentaryLineA
xmap <C-/> <Plug>Commentary
augroup DevOps
autocmd FileType ignore,gitconfig setlocal commentstring=#\ %s
augroup END
sjl/gundo.vim
[!TIP]
- delete undo file for 3 days ago
$ find ~/.vim/undo -mtime +3 # or $ fd --type=file \ --change-older-than=30days \ . \ ~/.cache/vim/{backup,swap,undo}/ \ -x rm -v
Plug 'sjl/gundo.vim'
noremap <Leader>u :GundoToggle<CR>
set undodir=~/.vim/undo/
set undofile
colors and themes
NvChad/nvim-colorizer.lua
```vim title="~/.vimrc.d/extension" Plug 'NvChad/nvim-colorizer.lua'
```ruby title="~/.config/nvim/init.lua"
require('config/theme')
# ~/.config/nvim/lua/config/theme.lua
require 'colorizer'.setup()
require 'colorizer'.setup {
filetypes = {
'*';
css = { rgb_fn = true; mode = 'background'; };
html = { names = true; };
cmp_docs = {always_update = true}
},
user_default_options = { RRGGBBAA = true, css_fn = true, css = true, tailwind = true },
buftypes = { "*", "!prompt", "!popup", }
}
others
[!NOTE|label:references:]
- Neovim for Newbs. FREE NEOVIM COURSE
- From 0 to IDE in NEOVIM from scratch | FREE COURSE // EP 1
- A BEAUTIFUL neovim config with Lazy | FREE COURSE // EP 2
- LSP in Neovim. Thanks to BILL GATES?! | FREE COURSE // EP 3
- What the hell is NULL-LS | FREE COURSE // EP 4
- Autocomplete and Snippets in Neovim | FREE COURSE // EP 5
- How to configure Debuggers in Neovim | FREE COURSE // EP 6
- Neovim Configuration
ctrl-p
ycm-core/YouCompleteMe
ycm-core/lsp-examples
dense-analysis/ale
hrsh7th/cmp-nvim-lsp
require('cmp_nvim_lsp').default_capabilities
require'cmp'.setup {
sources = {
{ name = 'nvim_lsp' }
}
}
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- An example for configuring `clangd` LSP to use nvim-cmp as a completion engine
require('lspconfig').clangd.setup {
capabilities = capabilities,
... -- other lspconfig configs
}
Plug 'hrsh7th/cmp-nvim-lsp'
set runtimepath+=~/.vim/plugged/cmp-nvim-lsp
vim-easycomplete
[!NOTE|label:references:]