-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostic display and autocomplete for javascript are abnormal #3625
Comments
Please reproduce using the minimal vimrc and provide steps to reproduce.
You didn’t do this. |
FWIW I’m fairly certain that this is just how typescript works. Tern might work better for you, but afaict YCM is working correctly |
I check, I don't have vimrc_ycm_minimal in /path/to/YouCompleteMe. |
Ok thanks. Can you update YCM first then? It’s here https://github.com/ycm-core/YouCompleteMe/blob/master/vimrc_ycm_minimal |
I reinstall YCM yesterday. |
The "problem" is that TSServer is expecting static interfaces - no dynamic properties allowed. So if you declare a |
OO..Thanks. |
More specifically, this works. class Person {
age: number;
}
var person = new Person();
person.age = 29; |
Thanks, you know a lot about this. |
as i said, if you want a more javascript-like setup with type inferences like this, try tern TBH i'm surprised that tsserver isn't doing a better job of this. Does it work if you do: var person = { 'name': "Joe", 'age': 100 }; |
btw; check your vim-plug setup IIRC it has some dodgy cacheing thing which breaks YCM updates. |
Yes, it works with object literals. I'd call this behaviour fine, since the entire point of typescript is having types. |
I would agree, except the file is quite clearly javascript, not typescript. |
But the file's extension was |
i see |
Hmm... I can repro the above behaviour if I name the file EDIT: No I can't. It reports the same error even for javascript. |
This is nothing to do with YCM, this is entirely the expected behaviour of tsserver. See my link to Tern as an alternative. |
Okk, THX. |
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
[Frequently Asked Questions][faq] section.
about to report and couldn't find an answer to my problem. ([Example Google
search.][search])
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, using
vim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what Iexpected 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've done :
I hope the ==Diagnostic display== and ==autocomplete== for javascript can Running correctly.
Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Output of
YcmDiags
OS version, distribution, etc.
The text was updated successfully, but these errors were encountered: