-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
TS 4.5.0-dev.20211029: JSX attrbutes not showing in intellisense #136377
Comments
I checked the provided example and it looks like the completion works Playground. Are there any additional steps to reproduce this issue? /cc @andrewbranch |
It repros locally on an insiders VS Code, so I assume that when an editor supports snippet completions (the playground doesn't AFAIK) then we're doing something wrong. |
Ah indeed, this looks like a VS Code bug. I can repro in VS Code, but the TS Server log looks as expected: {
"seq": 0,
"type": "response",
"command": "completionInfo",
"request_seq": 231,
"success": true,
"body": {
"isGlobalCompletion": false,
"isMemberCompletion": true,
"isNewIdentifierLocation": false,
"entries": [
{
"name": "a",
"kind": "JSX attribute",
"kindModifiers": "",
"sortText": "11",
"insertText": "a={$1}",
"replacementSpan": {
"start": {
"line": 11,
"offset": 7
},
"end": {
"line": 11,
"offset": 8
}
},
"isSnippet": true
},
{
"name": "b",
"kind": "JSX attribute",
"kindModifiers": "",
"sortText": "11",
"insertText": "b=\"$1\"",
"replacementSpan": {
"start": {
"line": 11,
"offset": 7
},
"end": {
"line": 11,
"offset": 8
}
},
"isSnippet": true
},
{
"name": "key",
"kind": "JSX attribute",
"kindModifiers": "declare,optional",
"sortText": "12",
"insertText": "key={$1}",
"replacementSpan": {
"start": {
"line": 11,
"offset": 7
},
"end": {
"line": 11,
"offset": 8
}
},
"isSnippet": true
}
]
}
} |
Nice, I'll defer to Andrew's investigation - @mjbvz can you transfer this to the VS Code side? I don't have permissions to do so. |
I've pushed my repro here: https://github.com/markusjohnsson/ts-46576 |
Just verified that our response on a single-line and on the split-line locations looks basically identical, so yeah, I think VS Code is just incorrectly filtering these out for some reason? |
This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Was this ever transferred to the vscode tracker? |
@markusjohnsson thanks for the reminder βοΈ |
@andrewbranch I believe the root cause is that ts now returns a "insertText": "b=\"$1\"",
"replacementSpan": {
"start": {
"line": 9,
"offset": 9
},
"end": {
"line": 9,
"offset": 10
}
}, Do you know why this span is being returned? It seems to map to the closing We probably need to fix this for November VS Code release (start of December) |
@mjbvz the fix for this is in the 4.5 branch now π |
Thanks @andrewbranch! Closing as fixed upstream |
Bug Report
π Search Terms
jsx tsx props attributes intellisense not working after newline
π Version & Regression Information
β― Playground Link
Sorry, cannot use JSX in playground.
π» Code
π Actual behavior
In 4.5.0-dev.20211029, JSX/TSX props/attributes are not displayed in intellisense completion after a newline.
same line works:
after newline, does not work:
π Expected behavior
JSX/TSX props/attributes
4.4.4:
both works:
The text was updated successfully, but these errors were encountered: