Is your feature request related to a problem? Please describe.
Currently I'm using nmap <silent> gd <Plug>(coc-definition) to jump to definition when navigating c++ files. The problem is that it closes the current file when jumping to new files.
Describe the solution you'd like
I want the jumping-to-definition command switching to an existing buffer in another tab if the target buffer is available; otherwise load the target file in new tab and jump to the line there. This is similar to youcompleteme's g:ycm_goto_buffer_command
Describe alternatives you've considered
N/A
Additional context
I'm totally new to this plugin and any help is appreciated.
This is a start:
:tabedit % | call CocActionAsync('jumpDefinition')
Personally I prefer the plugin minimalist and orchestrate these variations in VimL, since there can be many (some may prefer tabs, others splits, others without any of that, etc).
To change all location jump behavior, set "coc.preferences.jumpCommand": "drop"
For definition only, use :call CocAction('jumpDefinition', 'drop')
@chemzqm For definitions that point to a single location, what I really want is :call CocAction('jumpDefinition', 'tab drop'). But this doesn't work when the definition involves multiple locations -- now a quickfix list is open. How do I configure the default quickfix action? I'm not using denite btw.
I tried setting "coc.preferences.jumpCommand": "tab drop" but it has no effect at all.
Also, can you add support for tab drop as a openResourceCommand so that I don't have to set all the go-to commands individuall?
How do I configure the default quickfix action? I'm not using denite btw.
Seems vim doesn't support that, coc will use inputlist as default list other than quickfix in next release.
I tried setting "coc.preferences.jumpCommand": "tab drop" but it has no effect at all.
I've tried it could work, but the cursor position could be wrong.
I double checked that "coc.preferences.jumpCommand": "tab drop" doesn't have the intended effect on my machine. But :call CocAction('jumpDefinition', 'tab drop') does give the wrong cursor position. Can this be easily fix?
doesn't have the intended effect on my machine.
What does that means? Still open buffer in current window?
If you want "coc.preferences.jumpCommand" take effect, you should use :call CocAction('jumpDefinition') (no second argument)
Oh, I see. I thought jumpCommand affects <Plug>(coc-definition) too, which was what I used. Anyway, it does give the wrong cursor position.
it does give the wrong cursor position.
It's fixed on master branch.
@chemzqm Now the default <Plug>(coc-definition) or :call CocAction('jumpDefinition', 'edit') gives the wrong cursor position after I pull the master although :call CocAction('jumpDefinition', 'tab drop') gives the right position...
I can't reproduce that, possible conflict with other plugin.
@chemzqm No, I can reproduce the error with a minimal config. Here's a reproducing example:
#include <iostream>
int main() {
std::size_t i = 0;
}
With cursor on size_t and go to definition there, I get /home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h" 1780L, 51573C on vim and it hangs there unless I press some key then it opens up the c++config.h but the cursor is on the first line, which is wrong -- std::size_t is defined on line 199 of that file.
The cquery log since the go-to-def command:
( 12.929s) [stdin ] lsp.cc:25 | RecordPath: client=/home/aznb/mycodes/scbmc/test.cpp, normalized=/home/aznb/mycodes/scbmc/test.cpp
( 12.929s) [querydb ] lsp.cc:35 | No cached URI for /home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h
( 12.929s) [stdout ] timer.cc:41 | [e2e] Running textDocument/definition took 0.287ms
( 12.940s) [stdin ] lsp.cc:25 | RecordPath: client=/home/aznb/mycodes/scbmc/test.cpp, normalized=/home/aznb/mycodes/scbmc/test.cpp
( 12.940s) [querydb ] clang_complete.cc:791 | Dropped preloaded-based code completion session for /home/aznb/mycodes/scbmc/test.cpp
( 12.940s) [stdout ] timer.cc:41 | [e2e] Running textDocument/didClose took 0.139ms
( 13.084s) [stdin ] lsp.cc:25 | RecordPath: client=/home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h, normalized=/home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h
( 13.084s) [querydb ] utils.cc:298 | Reading /tmp/cquery/@@home@aznb@mycodes@scbmc/@home@[email protected]@include@[email protected]@x86_64-unknown-linux-gnu@bits@c++config.h
( 13.085s) [querydb ] timer.cc:41 | [querydb] Loading cached index file for DidOpen (blocks CodeLens) took 1.1129ms
( 13.085s) [querydb ] clang_complete.cc:856 | Flushed completion sessions for /home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h
( 13.085s) [indexer4 ] utils.cc:298 | Reading /tmp/cquery/@@home@aznb@mycodes@scbmc/@home@[email protected]@include@[email protected]@x86_64-unknown-linux-gnu@bits@c++config.h
( 13.086s) [comp-preload ] clang_complete.cc:410 | Creating completion session with arguments /home/linuxbrew/.linuxbrew/opt/llvm/bin/clang++ -working-directory=/home/aznb/mycodes/scbmc/build_clang -I/home/aznb/mycodes/scbmc/../thrust -I/home/aznb/mycodes/scbmc -I/home/aznb/mycodes/kokkos/core/src -I/home/aznb/mycodes/kokkos/containers/src -I/home/aznb/mycodes/kokkos/algorithms/src -I/home/aznb/mycodes/scbmc/build_clang/kokkos -I/home/linuxbrew/.linuxbrew/Cellar/boost/1.68.0_clang/include/boost-1_68 -I/home/aznb/mycodes/generic -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP -Ofast -ffast-math --std=c++17 -fopenmp=libomp --gcc-toolchain=/home/linuxbrew/.linuxbrew -std=c++17 /home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h -resource-dir=/home/linuxbrew/.linuxbrew/Cellar/llvm/7.0.1/lib/clang/7.0.1 -Wno-unknown-warning-option -fparse-all-comments -isystem/home/linuxbrew/.linuxbrew/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../../../include/c++/5.5.0 -isystem/home/linuxbrew/.linuxbrew/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../../../include/c++/5.5.0/x86_64-unknown-linux-gnu -isystem/home/linuxbrew/.linuxbrew/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../../../include/c++/5.5.0/backward -isystem/usr/local/include -isystem/home/linuxbrew/.linuxbrew/Cellar/llvm/7.0.1/lib/clang/7.0.1/include -isystem/usr/include/x86_64-linux-gnu -isystem/home/linuxbrew/.linuxbrew/include -isystem/usr/include -fspell-checking
( 13.086s) [indexer4 ] utils.cc:298 | Reading /tmp/cquery/@@home@aznb@mycodes@scbmc/@home@[email protected]@include@[email protected]@x86_64-unknown-linux-gnu@bits@c++config.h.json
( 13.102s) [indexer4 ]import_pipeline.cc:313 | Parsing /home/linuxbrew/.linuxbrew/include/c++/5.5.0/x86_64-unknown-linux-gnu/bits/c++config.h
and here's the coc-nvim.log:
2019-01-08T19:04:09.388 INFO (pid:9332) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:36:02.335 INFO (pid:11123) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:37:45.378 INFO (pid:11749) [services] - cquery state change: stopped => starting
2019-01-08T20:37:45.465 INFO (pid:11749) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:37:45.556 INFO (pid:11749) [services] - cquery state change: starting => running
2019-01-08T20:37:45.568 INFO (pid:11749) [services] - service languageserver.cquery started
2019-01-08T20:38:11.226 INFO (pid:11749) [services] - Json language server state change: stopped => starting
2019-01-08T20:38:11.827 INFO (pid:11749) [services] - Json language server state change: starting => running
2019-01-08T20:38:11.833 INFO (pid:11749) [services] - service json started
2019-01-08T20:38:24.583 INFO (pid:11749) [completion-complete] - Results from: json,around,buffer
2019-01-08T20:38:36.042 INFO (pid:11977) [services] - cquery state change: stopped => starting
2019-01-08T20:38:36.079 INFO (pid:11977) [services] - cquery state change: starting => running
2019-01-08T20:38:36.092 INFO (pid:11977) [services] - service languageserver.cquery started
2019-01-08T20:38:36.168 INFO (pid:11977) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:39:58.871 INFO (pid:12252) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:39:58.877 INFO (pid:12252) [services] - Json language server state change: stopped => starting
2019-01-08T20:39:59.099 INFO (pid:12252) [services] - Json language server state change: starting => running
2019-01-08T20:39:59.105 INFO (pid:12252) [services] - service json started
2019-01-08T20:40:02.971 INFO (pid:12252) [completion-complete] - Results from: json,around
2019-01-08T20:40:04.220 INFO (pid:12252) [completion-complete] - Results from: json,around
2019-01-08T20:40:04.513 INFO (pid:12252) [completion-complete] - Results from: json,around
2019-01-08T20:40:04.612 INFO (pid:12252) [completion-complete] - Results from: json,around
2019-01-08T20:40:10.306 INFO (pid:12329) [services] - cquery state change: stopped => starting
2019-01-08T20:40:10.381 INFO (pid:12329) [services] - cquery state change: starting => running
2019-01-08T20:40:10.390 INFO (pid:12329) [services] - service languageserver.cquery started
2019-01-08T20:40:10.393 INFO (pid:12329) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:41:18.346 INFO (pid:12527) [services] - Json language server state change: stopped => starting
2019-01-08T20:41:18.368 INFO (pid:12527) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:41:18.548 INFO (pid:12527) [services] - Json language server state change: starting => running
2019-01-08T20:41:18.554 INFO (pid:12527) [services] - service json started
2019-01-08T20:41:22.830 INFO (pid:12527) [completion-complete] - Results from: json,around
2019-01-08T20:41:35.203 INFO (pid:12626) [services] - cquery state change: stopped => starting
2019-01-08T20:41:35.247 INFO (pid:12626) [services] - cquery state change: starting => running
2019-01-08T20:41:35.264 INFO (pid:12626) [services] - service languageserver.cquery started
2019-01-08T20:41:35.337 INFO (pid:12626) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:42:17.028 INFO (pid:12889) [plugin] - coc initialized with node: v11.6.0
2019-01-08T20:44:38.663 INFO (pid:13673) [services] - cquery state change: stopped => starting
2019-01-08T20:44:38.695 INFO (pid:13673) [services] - cquery state change: starting => running
2019-01-08T20:44:38.706 INFO (pid:13673) [services] - service languageserver.cquery started
2019-01-08T20:44:38.755 INFO (pid:13673) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:11:38.818 INFO (pid:14623) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:12:56.004 INFO (pid:14733) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:13:22.771 INFO (pid:14733) [completion-complete] - Results from: around
2019-01-08T21:13:24.585 INFO (pid:14733) [completion-complete] - Results from: around
2019-01-08T21:13:31.948 INFO (pid:14979) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:17:45.822 INFO (pid:15653) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:20:58.241 INFO (pid:15885) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:22:32.913 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:36.182 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:36.571 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:36.813 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:36.995 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:37.071 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:37.176 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:37.312 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:37.538 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:43.027 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:53.064 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:22:53.564 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:01.035 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:06.023 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:07.524 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:08.157 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:08.701 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:09.039 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:09.137 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:09.240 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:09.559 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:10.663 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:12.225 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:12.834 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:13.547 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:13.667 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:13.795 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:14.988 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:35.461 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:35.955 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:36.342 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:36.495 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:36.740 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:37.303 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:37.930 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:51.487 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:52.673 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:23:54.804 WARN (pid:15885) [completion-complete] - Complete source "file" takes 1323ms
2019-01-08T21:23:54.804 INFO (pid:15885) [completion-complete] - Results from: file
2019-01-08T21:23:55.079 INFO (pid:15885) [completion-complete] - Results from: file,around
2019-01-08T21:23:59.904 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:01.776 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:04.911 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:08.661 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:09.029 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:09.119 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:09.387 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:15.181 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:17.625 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:28.347 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:28.985 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:34.453 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:35.061 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:38.550 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:39.226 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:40.889 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:41.704 INFO (pid:15885) [completion-complete] - Results from: file
2019-01-08T21:24:42.263 INFO (pid:15885) [completion-complete] - Results from: file
2019-01-08T21:24:49.798 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:50.342 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:50.541 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:50.679 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:51.511 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:52.752 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:55.150 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:55.987 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:24:58.572 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:01.539 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:03.291 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:04.038 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:04.683 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:07.358 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:07.924 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:17.166 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:17.489 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:25:17.844 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:48.904 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:55.250 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:56.096 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:57.035 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:57.960 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:58.702 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:26:58.883 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:00.482 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:01.091 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:01.701 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:02.515 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:06.870 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:07.546 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:07.725 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:09.486 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:09.545 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:10.151 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:10.628 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:10.804 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:27:10.852 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:17.226 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:18.126 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:19.747 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:21.466 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:22.761 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:29.166 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:30.703 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:31.305 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:38.184 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:41.248 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:41.520 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:41.617 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:41.679 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:42.447 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:44.938 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:48.580 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:48.716 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:48.840 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:48.962 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:49.119 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:49.171 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:49.459 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:51.010 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:51.772 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:53.681 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:54.512 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:55.057 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:29:55.569 INFO (pid:15885) [completion-complete] - Results from: around
2019-01-08T21:30:26.707 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:30:27.431 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:30:27.606 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:30:27.662 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:30:27.744 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:30:27.987 INFO (pid:15885) [completion-complete] - Results from: around,buffer
2019-01-08T21:30:40.769 INFO (pid:15885) [completion-complete] - Results from: buffer
2019-01-08T21:32:14.456 INFO (pid:16201) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:33:14.731 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:15.079 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:15.693 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:16.344 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:16.434 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:16.489 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:17.043 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:17.379 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:17.714 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:17.786 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:26.718 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:27.423 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:27.463 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:28.070 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:28.476 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:28.724 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:28.820 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:28.970 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:29.059 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:29.225 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:29.892 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:31.153 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:32.301 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:32.733 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:33.019 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:33.267 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:34.773 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:35.426 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:35.920 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:36.307 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:36.372 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:33:36.549 INFO (pid:16201) [completion-complete] - Results from: around
2019-01-08T21:34:07.482 INFO (pid:16289) [plugin] - coc initialized with node: v11.6.0
2019-01-08T21:35:39.676 INFO (pid:16514) [plugin] - coc initialized with node: v11.6.0
2019-01-08T22:24:41.808 INFO (pid:16880) [services] - cquery state change: stopped => starting
2019-01-08T22:24:41.877 INFO (pid:16880) [services] - cquery state change: starting => running
2019-01-08T22:24:41.888 INFO (pid:16880) [services] - service languageserver.cquery started
2019-01-08T22:24:41.938 INFO (pid:16880) [plugin] - coc initialized with node: v11.6.0
2019-01-08T22:26:17.839 INFO (pid:17110) [plugin] - coc initialized with node: v11.6.0
2019-01-08T22:27:46.211 INFO (pid:17110) [completion-complete] - Results from: around
2019-01-08T22:28:49.254 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:28:56.309 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:42.114 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:55.623 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:57.524 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:57.631 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:57.785 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:58.033 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:58.101 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:29:58.252 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:01.490 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:03.853 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:06.768 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:06.856 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.081 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.288 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.374 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.554 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.642 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:07.868 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:08.075 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:30:11.824 INFO (pid:16880) [completion-complete] - Results from: around,buffer
2019-01-08T22:31:03.864 INFO (pid:18648) [services] - cquery state change: stopped => starting
2019-01-08T22:31:03.890 INFO (pid:18648) [services] - cquery state change: starting => running
2019-01-08T22:31:03.899 INFO (pid:18648) [services] - service languageserver.cquery started
2019-01-08T22:31:03.976 INFO (pid:18648) [plugin] - coc initialized with node: v11.6.0
2019-01-08T22:36:24.622 INFO (pid:21694) [services] - cquery state change: stopped => starting
2019-01-08T22:36:24.656 INFO (pid:21694) [services] - cquery state change: starting => running
2019-01-08T22:36:24.676 INFO (pid:21694) [services] - service languageserver.cquery started
2019-01-08T22:36:24.727 INFO (pid:21694) [plugin] - coc initialized with node: v11.6.0
2019-01-08T22:37:37.815 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:37:43.650 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:37:44.416 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:37:44.570 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:37:44.910 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:37:45.062 INFO (pid:21694) [completion-complete] - Results from: around,buffer
2019-01-08T22:38:00.293 INFO (pid:21872) [services] - cquery state change: stopped => starting
2019-01-08T22:38:00.330 INFO (pid:21872) [services] - cquery state change: starting => running
2019-01-08T22:38:00.343 INFO (pid:21872) [services] - service languageserver.cquery started
2019-01-08T22:38:00.396 INFO (pid:21872) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:07:33.117 INFO (pid:25250) [services] - Json language server state change: stopped => starting
2019-01-08T23:07:33.133 INFO (pid:25250) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:07:33.305 INFO (pid:25250) [services] - Json language server state change: starting => running
2019-01-08T23:07:33.311 INFO (pid:25250) [services] - service json started
2019-01-08T23:07:37.087 INFO (pid:25326) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:07:46.146 INFO (pid:25406) [services] - cquery state change: stopped => starting
2019-01-08T23:07:46.203 INFO (pid:25406) [services] - cquery state change: starting => running
2019-01-08T23:07:46.217 INFO (pid:25406) [services] - service languageserver.cquery started
2019-01-08T23:07:46.262 INFO (pid:25406) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:09:08.323 INFO (pid:25739) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:12:09.674 INFO (pid:25831) [services] - cquery state change: stopped => starting
2019-01-08T23:12:09.718 INFO (pid:25831) [services] - cquery state change: starting => running
2019-01-08T23:12:09.733 INFO (pid:25831) [services] - service languageserver.cquery started
2019-01-08T23:12:09.785 INFO (pid:25831) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:13:08.507 INFO (pid:25968) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:14:16.644 INFO (pid:26043) [services] - cquery state change: stopped => starting
2019-01-08T23:14:16.692 INFO (pid:26043) [services] - cquery state change: starting => running
2019-01-08T23:14:16.703 INFO (pid:26043) [services] - service languageserver.cquery started
2019-01-08T23:14:16.762 INFO (pid:26043) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:14:37.257 INFO (pid:26169) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:15:45.544 INFO (pid:26225) [services] - cquery state change: stopped => starting
2019-01-08T23:15:45.572 INFO (pid:26225) [services] - cquery state change: starting => running
2019-01-08T23:15:45.581 INFO (pid:26225) [services] - service languageserver.cquery started
2019-01-08T23:15:45.649 INFO (pid:26225) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:15:54.646 INFO (pid:26330) [services] - cquery state change: stopped => starting
2019-01-08T23:15:54.677 INFO (pid:26330) [services] - cquery state change: starting => running
2019-01-08T23:15:54.686 INFO (pid:26330) [services] - service languageserver.cquery started
2019-01-08T23:15:54.775 INFO (pid:26330) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:16:56.675 INFO (pid:26462) [services] - cquery state change: stopped => starting
2019-01-08T23:16:56.706 INFO (pid:26462) [services] - cquery state change: starting => running
2019-01-08T23:16:56.716 INFO (pid:26462) [services] - service languageserver.cquery started
2019-01-08T23:16:56.784 INFO (pid:26462) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:17:37.494 INFO (pid:26611) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:18:04.748 INFO (pid:26673) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:19:15.081 INFO (pid:26747) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:19:22.125 INFO (pid:26799) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:19:37.666 INFO (pid:26860) [services] - cquery state change: stopped => starting
2019-01-08T23:19:37.695 INFO (pid:26860) [services] - cquery state change: starting => running
2019-01-08T23:19:37.707 INFO (pid:26860) [services] - service languageserver.cquery started
2019-01-08T23:19:37.755 INFO (pid:26860) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:19:39.296 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:19:41.763 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:19:44.710 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:19:44.954 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:19:54.051 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:19:59.945 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:02.256 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:03.672 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:19.123 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:26.318 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:27.293 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:28.123 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:28.589 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:30.929 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:31.787 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:33.399 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:35.529 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:43.629 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:44.377 INFO (pid:26860) [completion-complete] - Results from: around
2019-01-08T23:20:47.159 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:48.072 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:49.269 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:49.878 INFO (pid:26860) [completion-complete] - Results from: around
2019-01-08T23:20:51.393 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:20:52.459 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:20:53.244 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:15.430 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:19.960 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:21:25.283 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:26.132 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:28.980 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:21:30.012 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:34.716 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:35.815 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:21:37.782 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery,around
2019-01-08T23:21:38.268 INFO (pid:26860) [completion-complete] - Results from: languageserver.cquery
2019-01-08T23:22:27.627 INFO (pid:27243) [services] - cquery state change: stopped => starting
2019-01-08T23:22:27.730 INFO (pid:27243) [services] - cquery state change: starting => running
2019-01-08T23:22:27.739 INFO (pid:27243) [services] - service languageserver.cquery started
2019-01-08T23:22:27.752 INFO (pid:27243) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:22:35.616 INFO (pid:27334) [services] - cquery state change: stopped => starting
2019-01-08T23:22:35.644 INFO (pid:27334) [services] - cquery state change: starting => running
2019-01-08T23:22:35.659 INFO (pid:27334) [services] - service languageserver.cquery started
2019-01-08T23:22:35.708 INFO (pid:27334) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:22:42.433 INFO (pid:27423) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:23:22.369 INFO (pid:27482) [services] - Json language server state change: stopped => starting
2019-01-08T23:23:22.394 INFO (pid:27482) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:23:22.549 INFO (pid:27482) [services] - Json language server state change: starting => running
2019-01-08T23:23:22.555 INFO (pid:27482) [services] - service json started
2019-01-08T23:23:29.689 INFO (pid:27584) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:23:34.493 INFO (pid:27634) [services] - Json language server state change: stopped => starting
2019-01-08T23:23:34.520 INFO (pid:27634) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:23:34.687 INFO (pid:27634) [services] - Json language server state change: starting => running
2019-01-08T23:23:34.693 INFO (pid:27634) [services] - service json started
2019-01-08T23:25:21.088 INFO (pid:27702) [services] - cquery state change: stopped => starting
2019-01-08T23:25:21.123 INFO (pid:27702) [services] - cquery state change: starting => running
2019-01-08T23:25:21.135 INFO (pid:27702) [services] - service languageserver.cquery started
2019-01-08T23:25:21.192 INFO (pid:27702) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:25:39.755 INFO (pid:27788) [services] - cquery state change: stopped => starting
2019-01-08T23:25:39.784 INFO (pid:27788) [services] - cquery state change: starting => running
2019-01-08T23:25:39.794 INFO (pid:27788) [services] - service languageserver.cquery started
2019-01-08T23:25:39.872 INFO (pid:27788) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:25:45.832 INFO (pid:27870) [services] - cquery state change: stopped => starting
2019-01-08T23:25:45.890 INFO (pid:27870) [services] - cquery state change: starting => running
2019-01-08T23:25:45.899 INFO (pid:27870) [services] - service languageserver.cquery started
2019-01-08T23:25:45.968 INFO (pid:27870) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:26:09.159 INFO (pid:27960) [services] - Json language server state change: stopped => starting
2019-01-08T23:26:09.182 INFO (pid:27960) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:26:09.354 INFO (pid:27960) [services] - Json language server state change: starting => running
2019-01-08T23:26:09.360 INFO (pid:27960) [services] - service json started
2019-01-08T23:26:12.530 INFO (pid:28020) [services] - Json language server state change: stopped => starting
2019-01-08T23:26:12.581 INFO (pid:28020) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:26:12.773 INFO (pid:28020) [services] - Json language server state change: starting => running
2019-01-08T23:26:12.785 INFO (pid:28020) [services] - service json started
2019-01-08T23:27:17.571 INFO (pid:28085) [services] - Json language server state change: stopped => starting
2019-01-08T23:27:17.605 INFO (pid:28085) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:27:17.785 INFO (pid:28085) [services] - Json language server state change: starting => running
2019-01-08T23:27:17.799 INFO (pid:28085) [services] - service json started
2019-01-08T23:27:21.697 INFO (pid:28152) [services] - cquery state change: stopped => starting
2019-01-08T23:27:21.805 INFO (pid:28152) [services] - cquery state change: starting => running
2019-01-08T23:27:21.818 INFO (pid:28152) [services] - service languageserver.cquery started
2019-01-08T23:27:21.832 INFO (pid:28152) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:31:17.124 INFO (pid:28480) [services] - cquery state change: stopped => starting
2019-01-08T23:31:17.155 INFO (pid:28480) [services] - cquery state change: starting => running
2019-01-08T23:31:17.163 INFO (pid:28480) [services] - service languageserver.cquery started
2019-01-08T23:31:17.219 INFO (pid:28480) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:32:13.911 INFO (pid:28581) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:32:47.437 INFO (pid:28635) [services] - cquery state change: stopped => starting
2019-01-08T23:32:47.547 INFO (pid:28635) [services] - cquery state change: starting => running
2019-01-08T23:32:47.559 INFO (pid:28635) [services] - service languageserver.cquery started
2019-01-08T23:32:47.562 INFO (pid:28635) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:34:02.820 INFO (pid:28792) [services] - cquery state change: stopped => starting
2019-01-08T23:34:02.874 INFO (pid:28792) [services] - cquery state change: starting => running
2019-01-08T23:34:02.882 INFO (pid:28792) [services] - service languageserver.cquery started
2019-01-08T23:34:02.928 INFO (pid:28792) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:34:30.629 INFO (pid:28906) [services] - cquery state change: stopped => starting
2019-01-08T23:34:30.702 INFO (pid:28906) [services] - cquery state change: starting => running
2019-01-08T23:34:30.715 INFO (pid:28906) [services] - service languageserver.cquery started
2019-01-08T23:34:30.728 INFO (pid:28906) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:34:55.837 INFO (pid:28995) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:35:30.789 INFO (pid:29050) [services] - cquery state change: stopped => starting
2019-01-08T23:35:30.855 INFO (pid:29050) [services] - cquery state change: starting => running
2019-01-08T23:35:30.864 INFO (pid:29050) [services] - service languageserver.cquery started
2019-01-08T23:35:30.914 INFO (pid:29050) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:35:59.962 INFO (pid:29161) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:38:37.531 INFO (pid:29225) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:38:53.200 INFO (pid:29286) [services] - cquery state change: stopped => starting
2019-01-08T23:38:53.225 INFO (pid:29286) [services] - cquery state change: starting => running
2019-01-08T23:38:53.235 INFO (pid:29286) [services] - service languageserver.cquery started
2019-01-08T23:38:53.299 INFO (pid:29286) [plugin] - coc initialized with node: v11.6.0
2019-01-08T23:39:15.310 INFO (pid:29380) [services] - cquery state change: stopped => starting
2019-01-08T23:39:15.415 INFO (pid:29380) [services] - cquery state change: starting => running
2019-01-08T23:39:15.425 INFO (pid:29380) [services] - service languageserver.cquery started
2019-01-08T23:39:15.428 INFO (pid:29380) [plugin] - coc initialized with node: v11.6.0
Here are my config with a "minimal" vimrc and cquery
coc-setting.json:
{
"coc.preferences.autoTrigger": "always",
"coc.preferences.triggerAfterInsertEnter": false,
"coc.preferences.timeout": 2000,
"coc.preferences.noselect": true,
"coc.preferences.formatOnType": false,
"coc.preferences.diagnostic.enable": true,
"coc.preferences.diagnostic.signOffset": 1000,
"coc.preferences.diagnostic.errorSign": ">>",
"coc.preferences.diagnostic.warningSign": "âš ",
"coc.preferences.diagnostic.infoSign": ">>",
"coc.preferences.diagnostic.hintSign": ">>",
"coc.preferences.jumpCommand": "edit",
"languageserver": {
"cquery": {
"command": "cquery",
"args": ["--log-file=/tmp/cq.log"],
"filetypes": ["c", "cpp"],
"rootPatterns": ["compile_flags.txt", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cacheDirectory": "/tmp/cquery"
}
}
}
}
.vimrc:
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'do': 'yarn install'}
if has_key(g:plugs, "coc.nvim")
" use <tab> for trigger completion and navigate to next complete item
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
"use tab and shift-tab to navigate completion list
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
"Use <enter> to confirm complete
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
"To force coc select complete item before confirm, use:
inoremap <expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>"
"Close preview window when completion is done.
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
" Use `[c` and `]c` for navigate diagnostics
nmap <silent> [c <Plug>(coc-diagnostic-prev)
nmap <silent> ]c <Plug>(coc-diagnostic-next)
" Remap keys for gotos
"nmap <silent> gd :call CocAction('jumpDefinition', 'tab drop')<CR>
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K for show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if &filetype == 'vim'
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight')
" Remap for rename current word
nmap <leader>rn <Plug>(coc-rename)
" Remap for format selected region
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
vmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap for do codeAction of current line
nmap <leader>ac <Plug>(coc-codeaction)
" Fix autofix problem of current line
nmap <leader>qf <Plug>(coc-fix-current)
" Use `:Format` for format current buffer
command! -nargs=0 Format :call CocAction('format')
" Use `:Fold` for fold current buffer
command! -nargs=? Fold :call CocAction('fold', <f-args>)
endif "end of coc.nvim
" Add all your plugins here
" All of your Plugins must be added before the following line
call plug#end()
and my vim version:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 24 2018 14:20:10)
Included patches: 1-543
Compiled by Homebrew
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +extra_search +mouse_netterm +tag_old_static
+arabic +farsi +mouse_sgr -tag_any_white
+autocmd +file_in_path -mouse_sysmouse +tcl
+autochdir +find_in_path +mouse_urxvt +termguicolors
-autoservername +float +mouse_xterm +terminal
+balloon_eval +folding +multi_byte +terminfo
+balloon_eval_term -footer +multi_lang +termresponse
+browse +fork() -mzscheme +textobjects
++builtin_terms +gettext +netbeans_intg +timers
+byte_offset -hangul_input +num64 +title
+channel +iconv +packages +toolbar
+cindent +insert_expand +path_extra +user_commands
+clientserver +job +perl +vartabs
+clipboard +jumplist +persistent_undo +vertsplit
+cmdline_compl +keymap +postscript +virtualedit
+cmdline_hist +lambda +printer +visual
+cmdline_info +langmap +profile +visualextra
+comments +libcall +python/dyn +viminfo
+conceal +linebreak +python3/dyn +vreplace
+cryptv +lispindent +quickfix +wildignore
+cscope +listcmds +reltime +wildmenu
+cursorbind +localmap +rightleft +windows
+cursorshape -lua +ruby +writebackup
+dialog_con_gui +menu +scrollbind +X11
+diff +mksession +signs -xfontset
+digraphs +modify_fname +smartindent +xim
+dnd +mouse +startuptime +xpm
-ebcdic +mouseshape +statusline +xsmp_interact
+emacs_tags +mouse_dec -sun_workshop +xterm_clipboard
+eval -mouse_gpm +syntax -xterm_save
+ex_extra -mouse_jsbterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/home/linuxbrew/.linuxbrew/Cellar/vim/8.1.0543/share/vim
"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/home/linuxbrew/.linuxbrew/Cellar/gtk+/2.24.32_2/include/gtk-2.0 -I/home/linuxbrew/.linuxbrew/Cellar/gtk+/2.24.32_2/lib/gtk-2.0/include -I/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/include/pango-1.0 -I/home/linuxbrew/.linuxbrew/Cellar/atk/2.30.0/include/atk-1.0 -I/home/linuxbrew/.linuxbrew/Cellar/cairo/1.16.0/include/cairo -I/home/linuxbrew/.linuxbrew/Cellar/pixman/0.34.0_1/include/pixman-1 -I/home/linuxbrew/.linuxbrew/Cellar/libpng/1.6.35/include/libpng16 -I/home/linuxbrew/.linuxbrew/Cellar/zlib/1.2.11/include -I/home/linuxbrew/.linuxbrew/Cellar/libxcb/1.13/include -I/home/linuxbrew/.linuxbrew/Cellar/libxrender/0.9.10/include -I/home/linuxbrew/.linuxbrew/Cellar/renderproto/0.11.1/include -I/home/linuxbrew/.linuxbrew/Cellar/libxext/1.3.3/include -I/home/linuxbrew/.linuxbrew/Cellar/libx11/1.6.6/include -I/home/linuxbrew/.linuxbrew/Cellar/libxcb/1.13/include -I/home/linuxbrew/.linuxbrew/Cellar/libxau/1.0.8/include -I/home/linuxbrew/.linuxbrew/Cellar/libxdmcp/1.1.2/include -I/home/linuxbrew/.linuxbrew/Cellar/xproto/7.0.31/include -I/home/linuxbrew/.linuxbrew/Cellar/kbproto/1.0.7/include -I/home/linuxbrew/.linuxbrew/Cellar/xextproto/7.3.0/include -I/home/linuxbrew/.linuxbrew/Cellar/gdk-pixbuf/2.38.0_1/include/gdk-pixbuf-2.0 -I/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/include/pango-1.0 -I/home/linuxbrew/.linuxbrew/Cellar/harfbuzz/2.1.3/include/harfbuzz -I/home/linuxbrew/.linuxbrew/Cellar/graphite2/1.3.12/include -I/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/include/pango-1.0 -I/home/linuxbrew/.linuxbrew/Cellar/fribidi/1.0.5/include/fribidi -I/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/include/glib-2.0 -I/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/lib/glib-2.0/include -I/home/linuxbrew/.linuxbrew/Cellar/pcre/8.42/include -I/home/linuxbrew/.linuxbrew/Cellar/fontconfig/2.13.1/include -I/home/linuxbrew/.linuxbrew/Cellar/util-linux/2.32.1_2/include/uuid -I/home/linuxbrew/.linuxbrew/Cellar/expat/2.2.6/include -I/home/linuxbrew/.linuxbrew/opt/freetype/include/freetype2 -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/home/linuxbrew/.linuxbrew/Cellar/gtk+/2.24.32_2/lib -L/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/lib -L/home/linuxbrew/.linuxbrew/Cellar/atk/2.30.0/lib -L/home/linuxbrew/.linuxbrew/Cellar/cairo/1.16.0/lib -L/home/linuxbrew/.linuxbrew/Cellar/gdk-pixbuf/2.38.0_1/lib -L/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/lib -L/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/lib -L/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/lib -L/home/linuxbrew/.linuxbrew/Cellar/fontconfig/2.13.1/lib -L/home/linuxbrew/.linuxbrew/opt/freetype/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/openssl/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl/lib -L/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.0/lib/perl5/5.28.0/x86_64-linux-thread-multi/CORE -L/home/linuxbrew/.linuxbrew/lib -Wl,--as-needed -o vim -L/home/linuxbrew/.linuxbrew/Cellar/gtk+/2.24.32_2/lib -L/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/lib -L/home/linuxbrew/.linuxbrew/Cellar/atk/2.30.0/lib -L/home/linuxbrew/.linuxbrew/Cellar/cairo/1.16.0/lib -L/home/linuxbrew/.linuxbrew/Cellar/gdk-pixbuf/2.38.0_1/lib -L/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/lib -L/home/linuxbrew/.linuxbrew/Cellar/pango/1.42.4/lib -L/home/linuxbrew/.linuxbrew/Cellar/glib/2.58.1/lib -L/home/linuxbrew/.linuxbrew/Cellar/fontconfig/2.13.1/lib -L/home/linuxbrew/.linuxbrew/opt/freetype/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lelf -lnsl -lncurses -ldl -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.0/lib/perl5/5.28.0/x86_64-linux-thread-multi/CORE -fstack-protector-strong -L/usr/local/lib -L/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.0/lib/perl5/5.28.0/x86_64-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -L/home/linuxbrew/.linuxbrew/Cellar/tcl-tk/8.6.8_1/lib -ltcl8.6 -ldl -lz -lpthread -lieee -lm -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/ruby/2.5.3_2/lib -L/home/linuxbrew/.linuxbrew/Cellar/ruby/2.5.3_2/lib -lruby -lpthread -ldl -lcrypt -lm
Can't reproduce.
You need to check to jump location from language server by use output channel: https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
@chemzqm It doesn't seem to be related to LSP server because the vim status points to the right cursor location as shown in my previous comments. It looks like the plugin is resetting it somehow
I got the reason, the timing on vim could be wrong, it's fix on master now.
I also tried adding the options in https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel to coc-setting.json:
{
"coc.preferences.autoTrigger": "always",
"coc.preferences.triggerAfterInsertEnter": false,
"coc.preferences.timeout": 2000,
"coc.preferences.noselect": true,
"coc.preferences.formatOnType": false,
"coc.preferences.jumpCommand": "edit",
"coc.preferences.diagnostic.enable": true,
"coc.preferences.diagnostic.signOffset": 1000,
"coc.preferences.diagnostic.errorSign": ">>",
"coc.preferences.diagnostic.warningSign": "âš ",
"coc.preferences.diagnostic.infoSign": ">>",
"coc.preferences.diagnostic.hintSign": ">>",
"tsserver.trace.server": "verbose",
"languageserver": {
"cquery": {
"command": "cquery",
"args": ["--log-file=/tmp/cq.log"],
"filetypes": ["c", "cpp"],
"trace.server": "verbose",
"rootPatterns": ["compile_flags.txt", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cacheDirectory": "/tmp/cquery"
}
}
}
}
However, I got the warning that "Property tsserver.trace.server" is not allowed and I don't get any additional info in the log
OK. Now the go-to-definition do give the right cursor position but only after another random key stroke. What happens now is it opens the file and hangs and then go to the definition after any key stroke.
It's vim's problem you should use something like set shortmess=aFc to prevent the block of vim.
Hmm, shortmess doesn't help at all. I have used other lsp client and they worked before. Not sure what's causing the pause
Try set hidden, it fix the problem on my vim.
coc use vim's channel for communication, which is different from other plugins and wired on some situation.
Consider switch to neovim for better experience.
Most helpful comment
To change all location jump behavior, set
"coc.preferences.jumpCommand": "drop"For definition only, use
:call CocAction('jumpDefinition', 'drop')