Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
lhanjian edited this page Jan 15, 2018 · 7 revisions

LanguageClient-neovim https://github.com/autozimu/LanguageClient-neovim/wiki/cquery

vim-lsp https://github.com/prabirshrestha/vim-lsp/wiki/Servers-cquery

LanguageClient-neovim

nn <silent> <M-.> :call LanguageClient_textDocument_definition()<cr>
nn <silent> <M-,> :call LanguageClient_textDocument_references()<cr>
nn <f2> :call LanguageClient_textDocument_rename()<cr>
nn <leader>ji :Denite documentSymbol<cr>
nn <leader>jI :Denite workspaceSymbol<cr>

Send textDocument/hover when cursor moves.

augroup LanguageClient_config
  au!
  au BufEnter * let b:Plugin_LanguageClient_started = 0
  au User LanguageClientStarted setl signcolumn=yes
  au User LanguageClientStarted let b:Plugin_LanguageClient_started = 1
  au User LanguageClientStopped setl signcolumn=auto
  au User LanguageClientStopped let b:Plugin_LanguageClient_stopped = 0
  au CursorMoved * if b:Plugin_LanguageClient_started | call LanguageClient_textDocument_hover() | endif
augroup END