book
  • README
  • cheatsheet
    • bash
      • builtin
      • syntactic sugar
      • cmd
      • havefun
    • text-processing
      • awk
      • sed
      • html
      • json
      • regex
      • unicode
    • osx
    • curl
    • tricky
    • widget
    • proxy
    • colors
    • math
    • media
    • ssl
      • keystore
      • verification
      • server
      • client
      • tricky
    • windows
      • powershell
      • choco
      • wsl
      • wt
      • shortcut
      • clsid
      • env
      • shell:folder
  • vim
    • nvim
    • install
    • color
    • plugins
      • usage
      • other plugins
      • deprecated
    • tricky
    • viml
    • windows
    • troubleshooting
  • devops
    • admin tools
    • ssh
    • git
      • config
      • alias
      • submodule
      • eol
      • example
      • gerrit
        • gerrit API
      • github
      • troubleshooting
      • tricky
      • statistics
    • pre-commit
    • release-tools
    • tmux
      • cheatsheet
    • ansible
    • vault
    • artifactory
      • api
      • cli
      • aql
      • nginx cert
    • klocwork
      • kwadmin
      • kwserver
      • api
      • q&a
    • elk
    • mongodb
    • android
    • mobile
  • jenkins
    • config
      • windows
    • appearance
    • troubleshooting
    • jenkinsfile
      • utility
      • parallel
      • build
      • envvar
      • properties
      • trigger
      • node
    • script
      • job
      • build
      • stage
      • agent
      • security & authorization
      • exception
      • monitor
      • tricky
    • api
      • blueocean
    • cli
    • plugins
      • kubernetes
      • docker
      • shared-libs
      • lockable-resource
      • ansicolor
      • badge
      • groovy-postbuild
      • simple-theme
      • customizable-header
      • artifactory
      • jira-steps
      • job-dsl
      • build-timeline
      • crumbIssuer
      • coverage
      • uno-choice
      • tricky
  • virtualization
    • kubernetes
      • init
        • kubespray
        • kubeadm
          • environment
          • crio v1.30.4
          • docker v1.15.3
          • HA
        • addons
        • etcd
      • kubectl
        • pod
        • deploy
        • replicasets
        • namespace
        • secrets
      • node
      • certificates
      • events
      • kubeconfig
      • kubelet
      • troubleshooting
      • cheatsheet
      • auth
      • api
      • tools
        • monitor
        • helm
        • network
        • minikube
    • docker
      • run & exec
      • voume
      • remove
      • show info
      • dockerfile
      • dockerd
      • tricky
      • troubleshooting
      • windows
    • crio
    • podman
  • ai
    • prompt
  • osx
    • apps
      • init
      • brew
    • defaults
    • system
    • network
    • script
    • tricky
  • linux
    • devenv
    • util
      • time & date
      • output formatting
      • params
      • tricky
    • nutshell
    • disk
    • network
    • troubleshooting
    • system
      • apt/yum/snap
      • authorization
      • apps
      • x11
    • ubuntu
      • systemctl
      • x
    • rpi
  • programming
    • groovy
    • python
      • config
      • basic
      • list
      • pip
      • q&a
    • others
    • archive
      • angular
      • maven
      • mysql
        • installation
        • logs
      • ruby
        • rubyInstallationQ&A
  • tools
    • fonts
    • html & css
    • Jira & Confluence
    • node & npm
      • gitbook
      • hexo
      • github.page
      • code themes
    • app
      • microsoft office
      • vscode
      • virtualbox
      • iterm2
      • browser
      • skype
      • teamviewer
      • others
  • quotes
  • english
Powered by GitBook
On this page
  • plugin alternatives
  • autocompletion
  • language server protocol
  • snippets
  • cryptmethod
  • comments
  • programming
  • williamboman/nvim-lsp-installer
  • neovim/nvim-lspconfig
  • tpope/vim-commentary
  • sjl/gundo.vim
  • colors and themes
  • NvChad/nvim-colorizer.lua
  • others
  • ctrl-p
  • ycm-core/YouCompleteMe
  • ycm-core/lsp-examples
  • dense-analysis/ale
  • hrsh7th/cmp-nvim-lsp
  • vim-easycomplete

Was this helpful?

  1. vim
  2. plugins

other plugins

PrevioususageNextdeprecated

Last updated 1 year ago

Was this helpful?

plugin alternatives

autocompletion

[!NOTE|label:references:]

[!NOTE|label:references:]

[!NOTE]

  • " ~/.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

[!NOTE|label:references:]

$ mkdir -p ~/.cache/nvim/
# show all available packages
:LspInstall <TAB>
:LspInstall <package>
" i.e.:
:LspInstall groovyls

:LspInstallInfo
:LspPrintInstalled

:LspUninstall <package>
Plug 'neovim/nvim-lspconfig'
  • debug

    :LspInfo
    :LspLog

manual install lsp

[!NOTE]

  • $ 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

    • # 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" },
      }
  • $ 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
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

[!TIP]

  • $ 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

Plug 'NvChad/nvim-colorizer.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:]

ctrl-p

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

[!NOTE|label:references:]

|

|

|

|

|

| | | |

install lsp via :LspInstall

|

Code Completion for Neovim using Lazy
* 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
How to improve your vim/nvim coding experience with vim-easycomplete?
Vim-EasyComplete 体验优化踩坑记录
vim-easycomplete VS vim-lsp
Which lsp plugin should I use?
language server protocol
Ale Alternatives
* 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
Snippets with CoC
hrsh7th/vim-vsnip
hrsh7th/vim-vsnip-integ
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
kurotych/CCryptor.nvim
GPG
preservim/nerdcommenter
tpope/vim-commentary
williamboman/nvim-lsp-installer
#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.
neovim/nvim-lspconfig
williamboman/nvim-lsp-installer
gradlels
GroovyLanguageServer/groovy-language-server
ycm-core/lsp-examples
ansiblels
bashls
cmake
cmake-language-server
cssls
dockerls
pylsp
python-lsp/python-lsp-server
vimls
yamlls
tpope/vim-commentary
sjl/gundo.vim
delete undo file for 3 days ago
NvChad/nvim-colorizer.lua
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
Shougo/denite.nvim
ycm-core/YouCompleteMe
ycm-core/lsp-examples
dense-analysis/ale
hrsh7th/cmp-nvim-lsp
vim-easycomplete
How to improve your vim/nvim coding experience with vim-easycomplete?
Vim-EasyComplete 体验优化踩坑记录
vim-easycomplete VS vim-lsp
Which lsp plugin should I use?
plugin alternatives
autocompletion
language server protocol
snippets
cryptmethod
comments
programming
williamboman/nvim-lsp-installer
neovim/nvim-lspconfig
manual install lsp
tpope/vim-commentary
sjl/gundo.vim
colors and themes
NvChad/nvim-colorizer.lua
others
ctrl-p
ycm-core/YouCompleteMe
ycm-core/lsp-examples
dense-analysis/ale
hrsh7th/cmp-nvim-lsp
vim-easycomplete
groovyls
vim lspconfig treesitter coc