Flow-for-vscode: IntelliSense problems

Created on 25 Mar 2017  路  20Comments  路  Source: flowtype/flow-for-vscode

Hello,

This plugin is really awesome, but I noticed a problem, it was since I first discovered this plugin, so maybe more than 3 months. It happens for all variables, classes and so on. The problem is you get duplicate autocomplete suggestions which is mixed with VS Code and Flow, my suggestion is: if Flow finds autocompletion it disables VS Code to don't duplicate it, because right now it's really messy... Also sometimes if no VS Code suggestions finded, Flow suggestions will be almost at the bottom, there's no normal arrangement for Flow suggestions.

As you can see duplicated suggestions and this happens a lot, not only for variables...
screenshot from 2017-03-25 14-57-57

The most annoying part, sometimes you think there's no suggestions, but then you scroll down you will find them which isn't good, because they are mixed with just word suggestions which are found in file, there's no normal arrangement for Flow suggestions...
screenshot from 2017-03-25 15-04-05

In short: better always use Flow suggestions (if there's no Flow suggestions for that variable, etc. use VS Code then) and do normal arrangement of Flow suggestions.

Thanks,
svipben

Most helpful comment

@davnicwil you can now disable built-in extensions like TypeScript/JavaScript, etc.

https://code.visualstudio.com/updates/v1_21#_extensions

All 20 comments

I agree with this, I noticed double suggestions multiple times, and it's really starting to clutter the dropdown.

It's because of VS Code's TypeScript interpreter which cannot be turned off alas, closing as dupe of https://github.com/flowtype/flow-for-vscode/issues/50

@orta So both problems are impossible to fix? (duplicate suggestions and bad suggestions arrangement)

Yep, from this extension side

@orta What does VS Code team says? Maybe I need to create issue about that?

There are linked issues in #50 - would recommend looking through those 馃憤

After reading #17068, I found it's not possible to solve this issue in a short time. What a pity :(

I'm wondering if Atom has the same problem?

For anyone landing here now, vscode now supports this.

In user settings

"editor.wordBasedSuggestions": false

All flow suggestions now appear on top. The duplicates issue is still there and I haven't found how to fix that, but still the situation now is much better.

image

@davnicwil you can now disable built-in extensions like TypeScript/JavaScript, etc.

https://code.visualstudio.com/updates/v1_21#_extensions

It's nice to be able to disable the Typescript extension, but this Flow extension doesn't provide autocomplete on its own :(

@svipben thanks for this, this works nicely -- however when you turn off the built in TypeScript/JavaScript extension you lose the ability to cmd+click imports and link to the files, which is not ideal. I guess it is still a trade off for now between two annoyances.

To be honest I believe it needs a total rewrite of this extension or completely to use Atom if you're using Flow. If you're using VSC you can use vanilla JS and/or TypeScript. But with Flow, you will not get such benefits as in Atom because of support, stability, and features. I know this sounds odd, but that's true...

I tried to use Flow at 2017 March and the behavior how bad it is for Visual Studio Code exists till now at 2018 May. 1 year and nothing changed :) Issues are growing because Flow team doesn't care about Visual Studio Code.

TL;DR: If you're using Flow switch to Atom or WebStorm. If you're using TypeScript switch to Visual Studio Code or WebStorm.

I'd rather like to make VSC integration better. There are a lot of moving parts, but we'll get there 馃.

This sucks really bad?

@svipben, and everyone else watching this, I've implemented a config to disable the typescript autocomplete suggestions in the vscode JS/TS extension itself. It's solving this problem for me locally and I've submitted a PR.

If you want this feature, please comment on the PR to show your support!

https://github.com/Microsoft/vscode/pull/58011

@davnicwil this is a smart way to get this fixed 馃憤

This landed by the way, in 1.28.0

Set typescript.suggest.enabled: false to turn off TypeScript autocomplete suggestions completely.

Release notes here https://code.visualstudio.com/updates/v1_28#_new-settings-for-jsts-suggestions

Can any extension resolve options like this at runtime? We could recommend turning it off in project settings if it's not set in an update.

Why IntelliSense shows JavaScript methods on reccomendation for Java Code ? How i can disable this ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wbinnssmith picture wbinnssmith  路  5Comments

dnepro picture dnepro  路  5Comments

FezVrasta picture FezVrasta  路  5Comments

booboothefool picture booboothefool  路  4Comments

dominictwlee picture dominictwlee  路  5Comments