YouCompleteMe
YouCompleteMe copied to clipboard
some questions using YCM with compile_commands.json
Issue Prelude
Please complete these steps and check these boxes (by putting an x
inside
the brackets) before filing your issue:
- [x] I have read and understood YCM's [CONTRIBUTING]cont document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT]code document.
- [x] I have read and understood YCM's [README]readme, especially the [Frequently Asked Questions]faq section.
- [x] I have searched YCM's issue tracker to find issues similar to the one I'm about to report and couldn't find an answer to my problem. (Example Google search.)
- [x] If filing a bug report, I have included the output of
vim --version
. - [x] If filing a bug report, I have included the output of
:YcmDebugInfo
. - [x] If filing a bug report, I have attached the contents of the logfiles using
the
:YcmToggleLogs
command. - [x] If filing a bug report, I have included which OS (including specific OS version) I am using.
- [x] If filing a bug report, I have included a minimal test case that reproduces
my issue, using
vim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what I expected to happen and what actually happened. - [x] If filing a installation failure report, I have included the entire output
of
install.py
(orcmake
/make
/ninja
) including its invocation - [x] I understand this is an open-source project staffed by volunteers and that any help I receive is a selfless, heartfelt gift of their free time. I know I am not entitled to anything and will be polite and courteous.
- [x] I understand my issue may be closed if it becomes obvious I didn't actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
Provide a clear description of the problem, including the following key questions:
- What did you do?
- I generated the compile_commands.json using cmake "cmake -B target"
- Edit a cpp file using vim
- answer the question with option 'C'
- i find mistakes like "file can't be found " .etc, but the clangd is working which is confirmed by using YcmDebugInfo subcommands.
- The windows are list below, l have no idea to solve them and need help
![]()
*** config for YCM***
-
vim -Nu /path/to/YCM/ycm_vimrc_minimal
-
:edit test.py
- Enter insert mode and type
.....
Include description of a minimal test case, including any actual code required to reproduce the issue.
If you made changes to
vimrc_ycm_minimal
, pase them here:
<contents of ycm_vimrc_minimal>
- What did you expect to happen?
Include description of the expected behaviour.
- What actually happened?
Include description of the observed behaviour, including actual output, screenshots, etc.
Diagnostic data
Output of vim --version
fjw@MacBook-Pro cpp % [remotes/origin/master~1] vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, 编译于 Jul 12 2022 16:34:31)
macOS 版本 - arm64
包含补丁: 1-50
编译者 Homebrew
巨型版本 无图形界面。 可使用(+)与不可使用(-)的功能:
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term +gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand +perl +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
-clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap +ruby +wildignore
+cursorbind +lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname -sodium -X11
+digraphs +mouse -sound -xfontset
-dnd -mouseshape +spell -xim
-ebcdic +mouse_dec +startuptime -xpm
+emacs_tags -mouse_gpm +statusline -xsmp
+eval -mouse_jsbterm -sun_workshop -xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
Output of YcmDebugInfo
Paste output here
Output of YcmDiags
Paste output here
Output of git rev-parse HEAD
in YouCompleteMe installation directory
paste output here
Contents of YCM, ycmd and completion engine logfiles
Reproduce the issue with
vim -Nu /path/to/YCM/vimrc_ycm_minimal
, which enabled debug logging and other useful diagnostics. Include a link to a [gist][] containing all of the log files listed by:YcmToggleLogs
.
OS version, distribution, etc.
Include system information here.
Output of build/install commands
Include link to a [gist][] containing the invocation and entire output of
install.py
if reporting an installation issue.
![image](https://user-images.githubusercontent.com/49725532/182176189-14751179-e902-44ee-b520-ec633f128d4b.png)
So you are editing the ycmd source code, and you decide not to load the ycmd extra conf file, but you do load your own extra configuration file from your home directory.
what are you trying to achieve by that?
Unfortunately your steps to reproduce are not complete. Given this is the ycmd codebase it should be trivial for me to reproduce the issue, but I can't given your steps. Can you break down the exact sequence of commands you ran from, and reproduce using the ycm minimal vimrc like the template requests?
So you are editing the ycmd source code, and you decide not to load the ycmd extra conf file, but you do load your own extra configuration file from your home directory.
what are you trying to achieve by that?
Unfortunately your steps to reproduce are not complete. Given this is the ycmd codebase it should be trivial for me to reproduce the issue, but I can't given your steps. Can you break down the exact sequence of commands you ran from, and reproduce using the ycm minimal vimrc like the template requests?
Thanks for your suggestions
use the ycm minimal vimrc
![image](https://user-images.githubusercontent.com/49725532/182180807-75033fa5-0e88-4e9f-84d4-9d65a3ca7c28.png)
generate compile_commads.json
it alse happend but seems different
No extra configuration file found
What "wrong version" means
So you are editing the ycmd source code, and you decide not to load the ycmd extra conf file, but you do load your own extra configuration file from your home directory.
what are you trying to achieve by that?
Unfortunately your steps to reproduce are not complete. Given this is the ycmd codebase it should be trivial for me to reproduce the issue, but I can't given your steps. Can you break down the exact sequence of commands you ran from, and reproduce using the ycm minimal vimrc like the template requests?
it used /Users/fjw/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd with ycm_minimal_vimrc
So you are editing the ycmd source code, and you decide not to load the ycmd extra conf file, but you do load your own extra configuration file from your home directory.
what are you trying to achieve by that?
Unfortunately your steps to reproduce are not complete. Given this is the ycmd codebase it should be trivial for me to reproduce the issue, but I can't given your steps. Can you break down the exact sequence of commands you ran from, and reproduce using the ycm minimal vimrc like the template requests?
I am just using the YCM source code as an example, in fact, I have encountered this problem in other projects
please can you provide a minimal reproducible test case if you think this is a bug. YOu're not bulding the YCM source code correctly (you should use ./build.py --build-dir build and it should just work). But ycmd is not a minimal project.
use the ycm minimal vimrc
you should run vim -Nu /path/to/minimal_vimrc
, like CONTRIBUTING.md says.
no answer, closing