Giter VIP home page Giter VIP logo

vim-lsp-cquery's Introduction

vim-lsp-cquery

This plugin is an extension of vim-lsp plugin that supports some additional methods provided by cquery. For now, this methods are $cquery/base, $cquery/derived and $cquery/vars. More methods will be added in future.

Installing

Use your plugin manager of choise. For example if you use vim-plug add the following lines to your vimrc:

" First install vim-lsp, this plugin relies on it:
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'pdavydov108/vim-lsp-cquery'

Now follow the guide how to install cquery and add it to vim-lsp here.

Commands

In addition to those commands defined by vim-lsp plugin, this one defines the following additional commands:

  1. LspCqueryDerived - when used on function, get a list of functions that override this one. When used on a class, get a list of classes that inherit from this one.
  2. LspCqueryBase - get a base class (or a list of base classes) of this class.
  3. LspCqueryVars - get a list of all variables that are instances of this user-defined type.
  4. LspCqueryCallers - get a list of all callers of this function.

Mappings

No mappings are defined by default. However, it is trivial to define your own. For example like so:

autocmd FileType c,cc,cpp,cxx,h,hpp nnoremap <leader>fv :LspCqueryDerived<CR>
autocmd FileType c,cc,cpp,cxx,h,hpp nnoremap <leader>fc :LspCqueryCallers<CR>
autocmd FileType c,cc,cpp,cxx,h,hpp nnoremap <leader>fb :LspCqueryBase<CR>
autocmd FileType c,cc,cpp,cxx,h,hpp nnoremap <leader>fi :LspCqueryVars<CR>

For the explanation, see cquery FAQ.

vim-lsp-cquery's People

Contributors

pdavydov108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vim-lsp-cquery's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.