-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Does code completion work differently for different languages? #93
Comments
The |
Thank you so much for the explanation! 😍 |
Not sure, if I still do something wrong. I added this and it still doesn't seem to add code completion to JSON files.
|
Update: It looks like on-type code completion works outside of comments, string values and properties. Completions with |
When in comments and strings, the default in VS Code is that only |
Thank! I'll try that out in the next days. |
Okay, I tried {
"foo": "Typ<doesn't auto complete to TypeScript here>"
} |
That is specific problem with JSON - quick suggestions only work when typing at the end of a word and JSON defines |
duplicate of microsoft/vscode#30811 |
When I understand microsoft/vscode#30811 correctly JSON treats {
- label: 'TypeScript',
+ label: '"TypeScript',
kind: CompletionItemKind.Text,
data: 1
} Is there some kind of workaround? 🤔 |
The point is that quick suggestions only pop up when at the end of a symbol (word).
is not at the end of a symbol, but in the middle ( |
I tried this again and now it actually seems to work 🤔 |
I changed the
actionEvent
in thelsp-sample
from"onLanguage:plaintext"
(see here) to"onLanguage:json"
/"onLanguage:jsonc"
and opened a JSON file. I tried to writeT
orJ
somewhere to get autocompletion forTypeScript
orJavaScript
just as in the case of the plain text file, but it seems that theonCompletion
callback is never called.Is this a bug or a different languages treated differently? What should I need to do to get auto completion for other languages? I couldn't find something specific about this in the docs.
The text was updated successfully, but these errors were encountered: