GithubHelp home page GithubHelp logo

m-pilia / vim-ccls Goto Github PK

View Code? Open in Web Editor NEW
94.0 7.0 7.0 151 KB

Vim plugin for the ccls language server

License: MIT License

Shell 5.06% C++ 0.27% Dockerfile 0.98% Lua 2.81% Vim Script 90.88%
vim ccls language-server-protocol

vim-ccls's Introduction

vim-ccls: vim plugin for the ccls Language Server

Checks codecov License Docker hub

This plugin supports some additional methods provided by ccls, which are not part of the standard Language Server Protocol (LSP). It does not implement a LSP client, but it relies on an existing LSP plugin, adding on top of it the ccls-specific features. Currently supported LSP clients are:

The plugin implements a tree viewer to display call, inheritance, and member hierarchies. Trees are built lazily, fetching children only when it is needed to expand a sub-tree, allowing to handle large trees.

The call hierarchy allows to visualise a tree of functions calling the function under the cursor (analogous to the Call Hierarchy View in Eclipse). Similarly, the callee tree visualises a hierarchy in the opposite direction, showing functions being called.

The base/derived hierarchy allows to visualise inheritance trees for the class under the cursor.

The member hierarchy allows to visualise a tree of members inside a type under the cursor.

demo

Installation

This plugin can be installed with any vim plugin manager. One of the supported Language Server clients listed above needs to be installed and properly configured with ccls as language server in order for it to work.

If you have not done it already, build and install ccls, and configure your LSP client to use it (example instructions in the ccls wiki):

In order for ccls to work, make sure to correctly set up your project, by either providing a compilation database (compile_commands.json) or a .ccls configuration file.

Commands

The plugin provides the following commands. Hierarchy commands will open a tree-like buffer, while the other commands will populate the quickfix list.

  • CclsBase: Get a list of base classes for the symbol under the cursor.
  • CclsBaseHierarchy: Get a tree of inheritance ancestors for the symbol under cursor.
  • CclsDerived: Get a list of derived classes for the symbol under the cursor.
  • CclsDerivedHierarchy: Get a tree of inheritance descendants for the symbol under cursor.
  • CclsCallers: Get a list of functions calling the function under the cursor.
  • CclsCallHierarchy: Get a hierarchy of functions calling the function under the cursor.
  • CclsCallees: Get a list of functions called by the function under the cursor.
  • CclsCalleeHierahy: Get a hierarchy of functions called by the function under the cursor.
  • CclsMembers/CclsMemberFunctions/CclsMemberTypes: Get a lists of members for the symbol under cursor.
  • CclsMemberHierarchy/CclsMemberFunctionHierarchy/CclsMemberTypeHierarchy: Get a tree of members for the symbol under cursor.
  • CclsVars: Get a list of document variables.

Hierarchy commands accept an optional parameter -float to open the hierarchy in a floating window instead of a split (Neovim only).

Settings

It is possible to automatically close a tree buffer when jumping to a location:

let g:ccls_close_on_jump = v:true

To control how many levels of depth in the sub-tree are fetched for each request, when building a tree (a large value may make execution slow when generating large trees):

let g:ccls_levels = 1

The size and position of the tree window can be set:

let g:ccls_size = 50
let g:ccls_position = 'botright'
let g:ccls_orientation = 'horizontal'

The size of the floating window (Neovim only) can be controlled:

let g:ccls_float_width = 50
let g:ccls_float_height = 20

The following <Plug> mappings are available to interact with a tree buffer:

<Plug>(yggdrasil-toggle-node)
<Plug>(yggdrasil-open-node)
<Plug>(yggdrasil-close-node)
<Plug>(yggdrasil-execute-node)

The default key bindings are:

nmap <silent> <buffer> o    <Plug>(yggdrasil-toggle-node)
nmap <silent> <buffer> <cr> <Plug>(yggdrasil-execute-node)
nnoremap <silent> <buffer> q :q<cr>

They can be disabled and replaced with custom mappings:

let g:yggdrasil_no_default_maps = 1
au FileType yggdrasil nmap <silent> <buffer> o <Plug>(yggdrasil-toggle-node)

Debugging

If you encounter any problem, the first step for troubleshooting is to enable logging, by setting the following variable:

let g:ccls_log_file = expand('~/my_log_file.txt')

License

This software is distributed under the MIT license. The full text of the license is available in the LICENSE file distributed alongside the source code.

vim-ccls's People

Contributors

aceforeverd avatar lanza avatar m-pilia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-ccls's Issues

Open all call hierahcy at once

Hi,
I've increased this value to 3.

let g:ccls_levels = 3

but it still shows only one thing whenever pressing 'o'.
What I want is, just show full call path by pressing 'o' only once.
Is it possible? Or am I missing something?

Support for `textDocument/documentSymbol`

This would duplicate the functionality from Vista, however I prefer the vim-ccls float window implementation for most purposes. I tried getting this to work but I can't figure out the a:data parameter that vim-yggdrasil requires. CocRequest for textDocument/documentSymbol gives back a vim list. Some data massaging will have to be done to get it in the right form. That or vim-yggdrasil has to learn how to accept lists.

Plugin suddenly stopped working

I use NVIM v0.6.0-dev.
I found that is capabilities of nvim-lspconfig whith ccls is not enaugh to manage big c++ project. And this plugin is very helpful.

When I trying to call CclsDerivedHierarchy, I get this error.
Error executing vim.schedule lua callback: /home/serhii/.vim/plugged/vim-ccls/lua/vim_ccls/init.lua:27: Vim(let):E716: Key not present in Dictionary: "location.uri)"

maybe it is related to nvim update? How to solve this issue?

Thanks

Improve test coverage

Currently, tests cover only the Yggdrasil API. Add tests to cover the LSP ccls API.

Hierarchy commands should auto-expand the top-level node

The hierarchy commands start with a top-level node indicating where the command was initiated from. In basically call cases, it would be useful to expand at least the first layer, since any user would need to open that to get info they don't already have.

For member hierarchy, it might be worth just expanding recursively all direct members (ie not pointers or references), although I'm not sure if it is worth expanding stuff in std:: or other lib namespaces, so it isn't as obvious that it is desirable to auto-open more than the first layer.

nvim_lsp changed its name, resulting in "No LSP plugin found!" in vim-ccls

Hello,
The package nvim-lsp changed its name into lspconfig a few days ago (neovim/nvim-lspconfig@ddcd9e6). So I get the message "No LSP plugin found" when trying to do a call hierarchy.

I found a quick workaround to be able to use call hierarchies again:

diff --git a/autoload/ccls/lsp.vim b/autoload/ccls/lsp.vim
index ff8d7c6..3a7b31c 100644
--- a/autoload/ccls/lsp.vim
+++ b/autoload/ccls/lsp.vim
@@ -95,7 +95,7 @@ function! ccls#lsp#request(bufnr, method, params, handler) abort
catch
call ccls#util#warning('LSP error')
endtry

  • elseif get(g:, 'nvim_lsp', v:false)
  • elseif get(g:, 'lspconfig', v:false)
    " Use nvim-lsp
    let l:call_id = ccls#lsp#nvim_lsp#register(a:handler)
    let l:args = [a:bufnr, a:method, a:params, l:call_id]

Cannot jump from the root of the tree

Steps to reproduce

  1. Place the cursor over the root node of a hierarchy tree in the Yggdrasil window.
  2. Press .

Expected behaviour

Jump to the location of the definition for the symbol in the root node.

Actual behaviour

No jump happens.

Abstract the LSP interface

Create an abstraction layer around the LS calls, allowing to use multiple LS clients as Language Server backends.

Add CI

Add CI, and run the tests automatically on a per-commit basis.

<CR> overriden in Quickfix window

Hi,
Whenever I hit Entery key in a quickfix window whatever it is local or global,
it tries to run CclsMemberHierachy. But I don't want to do this but want to do the original behavior - jump to the location where it indicates as intended.
Could you tell me how I get it, please?

[Bug] vim-ccls: nvim-lspconfig error: no result from ccls

In my Neovim 0.5.0 setup configured with ccls as LSP for C, the following seem to work:

  • Diagnostic
  • Go to definition
  • Go to references
  • Hover
  • ....

e.g.:

vim.cmd("nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>")
vim.cmd("nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>")
vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>")
vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>")
....

and most of the remaining ccls capabilities.

But those mappings/commands:

vim.cmd("nnoremap <silent> g1 <cmd>lua vim.lsp.buf.incoming_calls()<CR>")
vim.cmd("nnoremap <silent> g2 <cmd>lua vim.lsp.buf.outgoing_calls()<CR>")

doesn't seem to work. Neovim reports:

method textDocument/prepareCallHierarchy is not supported by any of the servers registered for the current buffer

Anyway, vim-ccls reports for all of its commands:

vim-ccls: nvim-lspconfig error: no result from ccls

when executing them (with or without a word under the cursor).

Neovim version:

NVIM v0.5.0-dev+1384-gf2906a466
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -ID:/a/neovim/neovim/build/config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/nvim-deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include
Compilato da runneradmin@fv-az152-886

Features: -acl +iconv +tui
See ":help feature-compile"

   file vimrc di sistema: "$VIM\sysinit.vim"
         $VIM di riserva: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info

LspInfo output:

Configured servers: graphql, html, rust_analyzer, yamlls, svelte, vhdl_tool, ccls, efm, ahk_lsp, terraformls, angularls, texlab, pyright, cssls, vimls, vhdl_ls, solargraph, elixirls, intelephense, dockerls, elmls, dartls, vuels, gopls, bashls, kotlin_language_server, jsonls, tsserver, sumneko_lua, emmet_ls
Neovim logs at: C:\Users\Username\AppData\Local\Temp\nvim/lsp.log

1 client(s) attached to this buffer: ccls

  Client: ccls (id 1)
  	root:      C:\Work\Projects\Git\ACounter\testlut
  	filetypes: c, cpp, objc, objcpp
  	cmd:       ccls --log-file=ccls.log -v=1
  	


1 active client(s): 

  Client: ccls (id 1)
  	root:      C:\Work\Projects\Git\ACounter\testlut
  	filetypes: c, cpp, objc, objcpp
  	cmd:       ccls --log-file=ccls.log -v=1
  	


Clients that match the filetype cpp:
  
  Config: ccls
  	cmd:               ccls --log-file=ccls.log -v=1
  	cmd is executable: True
  	identified root:   C:\Work\Projects\Git\ACounter\testlut
  	custom handlers:   

compile_commands.json:

[
{
  "directory": "C:/Work/Projects/Git/ACounter/testlut/Build_Unix",
  "command": "C:/msys64/mingw64/bin/c++.exe   -std=gnu++17 -Weverything -o CMakeFiles/testlut.dir/main.cpp.obj -c C:/Work/Projects/Git/ACounter/testlut/main.cpp",
  "file": "C:/Work/Projects/Git/ACounter/testlut/main.cpp"
}
]

LSP Config .lua setting:

require'lspconfig'.ccls.setup {
    cmd = {"ccls", "--log-file=ccls.log", "-v=1"},
    root_dir = require('lspconfig/util').root_pattern("compile_commands.json", "compile_flags.txt", ".ccls"),
    on_attach = require'lsp'.common_on_attach,
}

ccls_log_file_content:

07/06/2021 16:30:00 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>133_handle_locations", "params": {"derived": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 11, "line": 45}}}]
07/06/2021 16:30:05 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>133_handle_tree", "params": {"levels": 1, "derived": false, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 11, "line": 45}}}]
07/06/2021 16:30:09 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>133_handle_tree", "params": {"levels": 1, "callee": false, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 11, "line": 45}}}]
07/06/2021 16:30:25 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>133_handle_locations", "params": {"derived": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:28 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>133_handle_tree", "params": {"levels": 1, "derived": false, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:32 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>133_handle_tree", "params": {"levels": 1, "callee": false, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:35 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>133_handle_tree", "params": {"levels": 1, "callee": true, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:38 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>133_handle_locations", "params": {"callee": true, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:41 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>133_handle_locations", "params": {"callee": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:30:45 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>133_handle_locations", "params": {"derived": true, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 23, "line": 758}}}]
07/06/2021 16:47:16 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>136_handle_locations", "params": {"derived": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 13, "line": 295}}}]
07/06/2021 16:47:22 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>136_handle_tree", "params": {"levels": 1, "callee": false, "hierarchy": true, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 16, "line": 296}}}]
07/06/2021 16:56:04 | ["Outgoing", {"method": "$ccls/inheritance", "handler": "<SNR>139_handle_locations", "params": {"derived": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 21, "line": 296}}}]
07/06/2021 16:58:05 | ["Outgoing", {"method": "$ccls/call", "handler": "<SNR>139_handle_locations", "params": {"callee": false, "hierarchy": false, "textDocument": {"uri": "file://C:/Work/Projects/Git/ACounter/testlut/main.cpp"}, "position": {"character": 18, "line": 295}}}]

ccls log file:

16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:274 I initialize in directory C:/Work/Projects/Git/ACounter/testlut with uri file:///C:/Work/Projects/Git/ACounter/testlut
16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:297 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":".ccls-cache","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"diagnosticsRelatedInformation":true,"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100,"placeholder":true},"diagnostics":{"blacklist":[],"onChange":1000,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":0,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:329 I use -resource-dir=D:\CodeBlocks\llvm-11.0.1-install\lib\clang\11.0.1
16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:361 I workspace folder: C:/Work/Projects/Git/ACounter/testlut/
16:50:14              D:\CodeBlocks\ccls\src\project.cc:426 I loaded C:/Work/Projects/Git/ACounter/testlut/compile_commands.json
16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:386 I start 8 indexers
16:50:14              D:\CodeBlocks\ccls\src\messages\initialize.cc:394 I dispatch initial index requests
16:50:14              D:\CodeBlocks\ccls\src\pipeline.cc:493 I loaded project. Refresh semantic highlight for all working file.
16:50:14              D:\CodeBlocks\ccls\src\pipeline.cc:298 I load cache for C:/Work/Projects/Git/ACounter/testlut/main.cpp
16:50:14              D:\CodeBlocks\ccls\src\sema_manager.cc:763 I create session for C:/Work/Projects/Git/ACounter/testlut/main.cpp
  C:/msys64/mingw64/bin/c++.exe --driver-mode=g++ -std=gnu++17 -Weverything -o CMakeFiles/testlut.dir/main.cpp.obj -c C:/Work/Projects/Git/ACounter/testlut/main.cpp -working-directory=C:/Work/Projects/Git/ACounter/testlut/Build_Unix

Neovim LSP log file:

[ START ] 2021-06-07T16:49:11+0200 ] LSP logging initiated
[ START ] 2021-06-07T16:50:07+0200 ] LSP logging initiated
[ WARN ] 2021-06-07T16:50:26+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:86 ]	"method textDocument/prepareCallHierarchy is not supported by any of the servers registered for the current buffer"
[ WARN ] 2021-06-07T16:50:28+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:86 ]	"method textDocument/prepareCallHierarchy is not supported by any of the servers registered for the current buffer"

Switch to GitHub Actions

Benefit

  1. Reduce third party dependencies.

Acceptance criteria

  1. Travis pipeline replaced with GitHub Actions workflow.

CclsMemberFunctions & CclsMemberTypes

CCLS offers the $ccls/member message with a parameter kind and values 2, 3, and 4 representing types, functions and variables. You currently have CclsMembers only getting vars. I think it would be useful to have this expanded to the other 2 permutations.

[Feature] Add more keybindings

More very useful keybindings to be used in the treeview panel/popup:

  • set the symbol under cursor as new root for callers
  • set the symbol under cursor as new root for callees
  • preview the destination without jumping on it and closing the popup/panel*

*for this it would also be very good to add an automatic preview option: when navigating the popup/panel treeview items, when placing the cursor on them, the corresponding line should be shown in the buffer or, eventually, on a completely new small preview box as done in other plugins.

how to disable on runtime

Hi,
I appreciate your great work.
However I feel uncomfortable when I'm using vimdiff.
Whenever I launch vimdiff, it tries to run ccls in the background.
And sometimes I feel that it gets sluggish in my big project. Thus I wonder if there is a method how to disable this plugin from working on runtime. I think it would be nice to provide an API eg CclsDisable

Calls tree is not expanded

Steps to reproduce

  • let g:ccls_levels = 1
  • trigger the call hierarchy tree view (CclsCallHierarchy) for a function with more than 1 levels of calls hierarchy
  • try to expand the tree node

Expected behavior

the node is expanded on the next level

Actual behavior

node is not expanded

Environment

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui

health#LanguageClient#check                                                                          
========================================================================                             
   - OK: binary found: /home/xbob/.config/nvim/plugged/LanguageClient-neovim/bin/languageclient       
   - OK: languageclient 0.1.155                                                                   
   - OK: Floating window is supported and will be used for hover

## Python 3 provider (optional)                                                                      
   - INFO: Using: g:python3_host_prog = "/home/xbob/.env/python/neovim/bin/python"                    
   - INFO: Executable: /home/xbob/.env/python/neovim/bin/python                                       
   - INFO: Python version: 3.7.4                                                                         
   - INFO: pynvim version: 0.3.1 (outdated; from ~/.env/python/neovim/lib/python3.7/site-packages/neovim)
   - WARNING: Latest pynvim is NOT installed: 0.4.0

Add support for Neovim's native LSP API

Neovim's built-in LSP API has been recently merged into master.

Acceptance criteria

  • Investigate API and check its support for custom protocol extensions as the ones used by ccls.
  • If feasible, add support to use it as an additional LSP backend.

Add stronger integration tests

The current test strategy uses mocks of the LSP client APIs. This provides a controlled environment and helps preventing regressions, but it is not enough to prevent issues due to breaking changes in the dependencies (e.g. #39).

The purpose of this issue is to implement a full integration test that involves the latest version of the dependencies. The rough plan is:

  • in each build, download the latest version of each dependency and test against it (ALE, vim-lsp, vim-lsc, coc.nvim, etc.)
  • either set-up a real, minimal project, and get/build ccls, or implement a mock of ccls

Add alternative floating window display

Add an alternative to use a floating window, when available, to display the tree, as opposed to a split window.

Acceptance criteria

  • Feature implemented
  • Documentation updated
  • Tests updated

Decouple autoload#ccls#lsp

Description

Turn autoload#ccls#lsp in a pure LSP library, and make it independent from the view and from anything that is not directly related to the LSP.

Benefits

  • Make autoload#ccls#lsp directly reusable outside this project.
  • Better maintainability.

[Bug] `ccls` not detected when starting other LSP in a different buffer

This line:

for _, v in ipairs(clients) do

Should be changed to:

for _, v in pairs(clients) do 

otherwise ccls won't be detected anymore for a given buffer, when starting another LSP server on a different buffer.

My modification has been tested and it always works. Some possible explanations:

ojroques/nvim-hardline#31

https://www.tutorialspoint.com/what-is-the-difference-between-pairs-vs-ipairs-in-lua#:~:text=In%20Lua%2C%20we%20make%20use,stored%20at%20that%20index%20table.

Optionally show previews in a split/popup

Pretty simple idea -- if you're in a vim-ccls pane and hit p it'll toggle showing a preview in a vsplit of the location of the current highlighted line.

class Base {}
class Sub1 : public Base {}
case Sub2 : public Base {}

Calling CclsDerivedHierarchy on Base will yield

V Base
   * Sub1
   * Sub2     <---- cursor

and with the cursor on Sub2 it'll call vsplit lib/File/Sub2.cpp.

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.