You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
If filing a bug report, I have included the output of vim --version.
If filing a bug report, I have included the output of :YcmDebugInfo.
If filing a bug report, I have attached the contents of the logfiles using
the :YcmToggleLogs command.
If filing a bug report, I have included which OS (including specific OS
version) I am using.
If filing a bug report, I have included a minimal test case that reproduces
my issue, including what I expected to happen and what actually happened.
If filing a installation failure report, I have included the entire output
of install.py (or cmake/make/ninja) including its invocation
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.
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
What did you do?
I started typing a Rust doc comment (starting with /// instead of //), and the autocomplete menu popped up, even though completion doesn't happen in normal comments.
Type this in a Rust file (extension .rs):
fnmain(){}/// ma
and main will be suggested for autocomplete. If you instead only type two slashes, no autocomplete will happen, because YCM realises that is a comment.
What did you expect to happen?
When autocompletion in comments is disabled, autocompletion should also not occur in doc comments.
What actually happened?
Autocompletion always occurs in Rust doc comments.
The line of code here returns Special when in a doc comment (Comment for a normal comment). However, vim-scriptease's zS command prints rustCommentLineDoc.
Removing the call to synIDtrans, i.e. changing the code from
seems to fix the problem (since the call now returns rustCommentLineDoc, which contains the string Comment), and I didn't notice any obvious problems caused by that. However, I didn't test very much, hence the issue and not a PR :)
Looking back in the git history, the synIDtrans call was introduced in c3a6ac2, to fix #102 (which was also a "YCM completes in comments" bug...); maybe the real solution would be for YCM to check both the translated and untranslated syntax IDs to see if they contain Comment?
Thanks for the report. PR #3002 should fix the issue. It's based on your suggestion to check the translated and untranslated name of the syntax item (and also on the use of synstack to get the list of syntax items at the cursor position).
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
Frequently Asked Questions section.
about to report and couldn't find an answer to my problem. (Example Google
search.)
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, including what I expected to happen and what actually happened.
of
install.py
(orcmake
/make
/ninja
) including its invocationthat 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.
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
I started typing a Rust doc comment (starting with
///
instead of//
), and the autocomplete menu popped up, even though completion doesn't happen in normal comments.Type this in a Rust file (extension
.rs
):and
main
will be suggested for autocomplete. If you instead only type two slashes, no autocomplete will happen, because YCM realises that is a comment.When autocompletion in comments is disabled, autocompletion should also not occur in doc comments.
Autocompletion always occurs in Rust doc comments.
The line of code here returns
Special
when in a doc comment (Comment
for a normal comment). However, vim-scriptease'szS
command printsrustCommentLineDoc
.Removing the call to
synIDtrans
, i.e. changing the code fromto
seems to fix the problem (since the call now returns
rustCommentLineDoc
, which contains the stringComment
), and I didn't notice any obvious problems caused by that. However, I didn't test very much, hence the issue and not a PR :)Looking back in the git history, the
synIDtrans
call was introduced in c3a6ac2, to fix #102 (which was also a "YCM completes in comments" bug...); maybe the real solution would be for YCM to check both the translated and untranslated syntax IDs to see if they containComment
?Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Contents of YCM, ycmd and completion engine logfiles
Logs
OS version, distribution, etc.
Ubuntu 16.04.4
The text was updated successfully, but these errors were encountered: