-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Commit characters broken in simple cases #181567
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
Comments
This particular code snippet works in VSCode, but not in TypeScript Workbench
Please just always accept dot to complete, whatever flawed context-based logic you're trying to follow here is only adding frustration for everyone |
@RyanCavanaugh Why did you move the issue? Don't you know that similar issues have been auto-closed in the vscode tracker?
@mjbvz please move the issue back to the typescript tracker instead of closing it like you did with other issues |
Works fine for me in VS Code. Is this only an issue in the TS playground? |
@mjbvz |
Minimal example: function foo() {
const x = fo // trigger suggest and type . here
} @RyanCavanaugh I still think TS needs to be the one computing the commit characters. This will align it more with the LSP and let editors have a consistent UX |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
@mjbvz @RyanCavanaugh what info is needed exactly here? |
@mjbvz is investigating what the next steps should be here in terms of whether TS server or VS code needs to change its behavior and how. We talked about this at the typescript vs code sync yesterday and everyone was in agreement that, ideally, dot is indeed a completion character here, we just need to work out the details of whether that's always the case and if not, how we figure out when it is. |
@RyanCavanaugh I investigated this further. We disable commit characters in this case because TypeScript returns Closing this as a duplicate of microsoft/TypeScript#31244. I still think it would make sense to have TS compute the commit characters instead of VS Code. For reference, here's where we compute these today: vscode/extensions/typescript-language-features/src/languageFeatures/completions.ts Line 495 in 5356e7b
|
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
π Search Terms
vscode complete dot
vscode commit characters
typescript commit characters
π Version & Regression Information
Most likely never worked properly
β― Playground Link
[<!--
A link to a TypeScript Playground "Share" link which shows this behavior
The TypeScript Workbench can be used for more complex setups, try
https://www.typescriptlang.org/dev/bug-workbench/
As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
Playground link with relevant code](https://www.typescriptlang.org/play?#code/PTAEHUFMBsGMHsC2lQBd5oBYoCoE8AHSAZVgCcBLA1UABWgEM8BzM+AVwDsATAGiwoBnUENANQAd0gAjQRVSQAUCEmYKsTKGYUAbpGF4OY0BoadYKdJMoL+gzAzIoz3UNEiPOofEVKVqAHSKymAAmkYI7NCuqGqcANag8ABmIjQUXrFOKBJMggBcISGgoAC0oACCbvCwDKgU8JkY7p7ehCTkVDQS2E6gnPCxGcwmZqDSTgzxxWWVoASMFmgYkAAeRJTInN3ymj4d-jSCeNsMq-wuoPaOltigAKoASgAywhK7SbGQZIIz5VWCFzSeCrZagNYbChbHaxUDcCjJZLfSDbExIAgUdxkUBIursJzCFJtXydajBBCcQQ0MwAUVWDEQC0gADVHBQGNJ3KAALygABEAAkYNAMOB4GRonzFBTBPB3AERcwABS0+mM9ysygc9wASkUAHEGMEVDhmh4yF5EOLnMD2DQvm4zMx2AxmJB+LBoOpEhz4HoRF4+XSGUzBHykti+eAHKgAOTCABykAkfKCKgA8l8yO9BO6tJAjqhHApXNI8KAnFadMMsPoUAhENDhJcHRJxdERAYONiFkxWBweEESkA)
π» Code
π Actual behavior
Typing
Ga
, then dot puts dot after Gaπ Expected behavior
Whatever suggestion is selected (e.g.
GainNode
) must be completed and inserted in the code, followed by a dotThe text was updated successfully, but these errors were encountered: