Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
New config to turn off TypeScript autocomplete suggestions #58011
The default is
The typescript autocomplete suggestions are a great feature, when you're working on a typescript project.
But when you're working on a flow project using the flow-for-vscode plugin, it provides its own autocomplete suggestions via flow. So your autocomplete gets littered with duplicate suggestions coming from both typescript and flow:
What this config does is turns off the typescript suggestions, so you get this instead:
I.e. no duplicates, only the
There have been a few existing issues raised about this problem both on the
Quoting from the third issue there
So, what am I doing submitting a PR for a setting? Why doesn't #17068 solve the problem?
Why? Because the extension also provides some other functionality I can't do without.
It's actually worse to lose this functionality, than to just deal with the duplicates in autocomplete. So this is definitely not a solution to the problem.
I really believe vscode needs the ability to turn off typescript autocomplete, specifically. Flow support provided via the awesome flow-for-vscode combined with all of the rest vscode's great feature set makes it a really good editor for flow projects, but this autocomplete issue is one of the last remaining obvious and annoying things that just get in the way of productivity. And it's so easy to fix!
The idea behind this PR seems fine. However I believe this new setting should disable all completions from js/ts, including name based suggestions. This is what similar settings like
Also keep in mind that we make no guarantees that our built-in js/ts support will work at all for flow code (and operations like formatting or refactoring may even break flow code). That's why we recommend disabling the built-in js/ts support if you are using the flow extension. The flow extension really needs to implement these tooling feature on their side to ensure they work properly
Great. You are right about the approach of having extensions take over full responsibility for things being better. But that might take a while and this config change is pretty simple (and would also be simple to remove later) and solves the problem today.
I will remove the distinction between name suggestions / others, and just have it disable every suggestion. You make a good point that it would break from the convention a bit.
You can now manage built-in extensions: https://code.visualstudio.com/updates/v1_21#_extensions which will disable TS/JS autocomplete and you can easily use flow in VS Code, so why this is needed? Or I'm missing something?
@noppa Thanks, good to know. Also, I totally agree with @mjbvz it is Flow extension responsibility, but as I know they actually don't care and to be honest TypeScript is way better since it works way faster, you get refactoring for file names, paths, etc. If you really want good support for Flow and to use VS Code you should create your own extension.
Maybe it makes sense to control built-in JS/TS language features instead of disabling them all, like checkboxes with variuos features like renaming, jsdoc completion, linting, autocompletion, etc. I believe it would be good feature request.
That question is answered in the PR description in the section under So, what am I doing submitting a PR for a setting? Why doesn't #17068 solve the problem?
I like the
This is a simple change that solves a specific problem. That might be a good feature for that other people need for broader usecases but this PR is just focused on disabling JS/TS autocomplete suggestions for a nicer experience working with flow and