ccls
ccls copied to clipboard
Support call (caller/callee) hierarchy, inheritance (base/derived) hierarchy, member hierarchy in neovim 0.5+ using native lsp
Wondering do we support native lsp in neovim 0.5+ for these calls?
I implemented these features via neovim0.5 lsp apis.
nmap <buffer> <silent> gc <cmd>lua vim.lsp.buf_request(0, '$ccls/call', param('callee', true), vim.lsp.handlers['textDocument/references'])<CR>
nmap <buffer> <silent> gC <cmd>lua vim.lsp.buf_request(0, '$ccls/call', param(), vim.lsp.handlers['textDocument/references'])<CR>
command! -nargs=0 Derived :lua vim.lsp.buf_request(0, '$ccls/inheritance', param('derived', true), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 Base :lua vim.lsp.buf_request(0, '$ccls/inheritance', param(), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 VarAll :lua vim.lsp.buf_request(0, '$ccls/vars', param(), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 VarLocal :lua vim.lsp.buf_request(0, '$ccls/vars', param('kind', 1), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 VarArg :lua vim.lsp.buf_request(0, '$ccls/vars', param('kind', 4), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 MemberFunction :lua vim.lsp.buf_request(0, '$ccls/member', param('kind', 3), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 MemberType :lua vim.lsp.buf_request(0, '$ccls/member', param('kind', 2), vim.lsp.handlers['textDocument/references'])
command! -nargs=0 MemberVar :lua vim.lsp.buf_request(0, '$ccls/member', param('kind', 4), vim.lsp.handlers['textDocument/references'])