From 75b4396147d381a14c8ac21b750a43ed851f3225 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 23 Aug 2018 22:14:10 -0700 Subject: [PATCH] vim --- Emacs.md | 10 +++++----- LanguageClient-neovim.md | 31 ++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Emacs.md b/Emacs.md index 5fb38ee..30b7589 100644 --- a/Emacs.md +++ b/Emacs.md @@ -1,8 +1,8 @@ -1. See [[Getting started]] to build the `bin/ccls` executable -1. Install [lsp-mode](https://github.com/emacs-lsp/lsp-mode) -2. Install [emacs-ccls](https://github.com/MaskRay/emacs-ccls) and [configure](#configure) it -3. Open a source file where either [[.ccls|Getting-started#ccls]] or [[compile_commands.json]] is in the project root (it may work without them, though not recommended) -4. `M-x lsp-ccls-enable`. Don't invoke `M-x lsp-mode`. `lsp-ccls-enable` will turn on `lsp-mode` for you +1. See [[Getting started]] to build the `ccls` executable +2. Install [lsp-mode](https://github.com/emacs-lsp/lsp-mode) +3. Install [emacs-ccls](https://github.com/MaskRay/emacs-ccls) and [configure](#configure) it +4. Open a source file where either [[.ccls|Getting-started#ccls]] or [[compile_commands.json]] is in the project root (it may work without them, though not recommended) +5. `M-x lsp-ccls-enable`. Don't invoke `M-x lsp-mode`. `lsp-ccls-enable` will turn on `lsp-mode` for you ### Install [emacs-ccls](https://github.com/MaskRay/emacs-ccls) diff --git a/LanguageClient-neovim.md b/LanguageClient-neovim.md index 5479e27..02cc2a8 100644 --- a/LanguageClient-neovim.md +++ b/LanguageClient-neovim.md @@ -1,7 +1,6 @@ -## [[Getting started]] - -## Install [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim) -Need [vim-plug](https://github.com/junegunn/vim-plug#unix-1) +1. See [[Getting started]] to build the `ccls` executable +2. Install [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim) + You may use the plugin manager [vim-plug](https://github.com/junegunn/vim-plug#unix-1) ### /home/YOUR_USERNAME/.config/nvim/init.vim ```vim @@ -85,14 +84,24 @@ nn xV :call LanguageClient#findLocations({'method':'$ccls/vars','kind': nn xx x ``` -Bases: base classes/overridden methods/specialized from -![$ccls/inheritanceHierarchy flat:t derived:false](https://ptpb.pw/ph3W.jpg) +`$ccls/inheritanceHierarchy flat:t derived:false`: base classes/overridden methods/specialized from -Derived -![$ccls/inheritanceHierarchy flat:t derived:true](https://ptpb.pw/sSkt.jpg) +![$ccls/inheritanceHierarchy flat:t derived:false](https://ptpb.pw/pEDL.jpg) -![$ccls/callers](https://ptpb.pw/U0xJ.jpg) +`$ccls/inheritanceHierarchy flat:t derived:true` -![$ccls/vars](https://ptpb.pw/1mCm.jpg) +![$ccls/inheritanceHierarchy flat:t derived:true](https://ptpb.pw/QgCd.jpg) -![$ccls/memberHierarchy flat:t](https://ptpb.pw/FSYc.jpg) +`$ccls/callers`: callers of a function + +![$ccls/callers](https://ptpb.pw/2RDi.jpg) + +The more general `$ccls/callHierarchy` has not been implemented by a Vim plugin. + +`$ccls/vars`: instances of a type + +![$ccls/vars](https://ptpb.pw/peyX.jpg) + +`$ccls/memberHierarchy flat:t`: fields of a struct/class/union/... + +![$ccls/memberHierarchy flat:t](https://ptpb.pw/V8WR.jpg)