-
Notifications
You must be signed in to change notification settings - Fork 111
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
Intellisense does not work for Exact Types #432
Comments
Okay actually the Non-React-Specific version of this seems to make the issue clearer: I think the problem for me is that my intellisense is just being provided by VSCode / typescript, which obviously cannot read Exact types because they dont exist in TS. Maybe I need to disable VSCode intellisense to allow the Flow extension to take over? |
Have you disabled TypeScript from running on Flow files, as recommended in the setup instructions? |
Yes I've tried all of that. I already have |
What does your flowconfig look like? Does Flow work correctly when running from the command line (i.e. does it correctly show type error if you do something like |
Yeah everything else from Flow is working absolutely fine, which I guess is why its taken me over a year of usage to realise the intellisense wasnt working correctly. Running from the command line identifies errors, and the error highlighting in the editor also works correctly. |
If you open the Output panel (ctrl+shift+U or View->Output) and then from the dropdown "Flow", does it show any errors or other useful info? |
no it does not. |
facebook/flow#8723 |
Yeah the problem here is that the Flow intellisense just doesnt work at all. Unfortunate! |
@frednomoon any updates about this issue? |
@alielmajdaoui nah nothing. as far as I can tell the feature just legit does not work... expecting to be permanently stuck between wanting to use Exact Types for clarity vs Inexact Types for a dev experience that isnt a complete disaster |
@frednomoon I would go with the 2nd option too! Btw, IntelliSense doesn't work with all utility types. I don't know why these very important and helpful features aren't being implemented. |
Flow does support Intellisense for inexact types and utility types, and there is no logic in the flow-for-vscode extension that would make it work for some and not others.
I really feel like the problem is not with exact types, but rather, flow-for-vscode isn't working at all for some of you.
It's strange that there is no output here whatsoever. If VSCode is running the extension at all, there should be at least a line that says "Checking flow-bin in [...]" if you've opened a javascript file in a flow project while the extension is installed. If that's not the case, is there anything mentioning "flow-for-vscode" in the "Log (Extension Host)" output pane? Also, what are your extension settings -- maybe try resetting the extension's settings to default temporarily to see if that fixes anything? |
@frednomoon maybe more helpful if you can share a larger screenshot of your current vscode env? For example showing what's in the flow output logs + the task bar at the bottom to give @vrama628 more debugging context? |
Yeah @vrama628 I completely agree - I actually said this in a previous comment. I am sure that I am not getting any Intellisense from the Flow plugin (rather than it being broken for certain things) and that Typescript is simply picking up what it can while it is enabled. However I have also attempted to get this working with Typescript etc fully disabled as per the instructions. When I do this, I just get zero intelliense (from neither flow nor typescript). Here is the lower part of my VSCode And here is the output from the Flow channel with various bits redacted (just since im at work):
I am fairly sure that the Flow server/ plugin is working... As you can see from this screenshot, I am getting totally accurate / useful syntax highlighting from Flow. But as you can also see, I get am not getting any Intellisense when I type an "f". Maybe we are talking at cross-purposes here - but my expectation is that the Intellisense should identify that there is a prop which begins with an "f" and suggest an auto completion and tell me what type it is anticipating (this is what VSCode typescript intellisense natively does). |
Please let me know if there is anything else I can send though, and thanks very much for your help. |
As for the "extension settings" I guess you just mean anything I have in my settings.json relating to the Flow extension? |
Apologies for the React specific example but thats my use case - its pretty simple either way.
In this example I am able to get intellisense when writing the Inexact example:
However when writing the Exact Typed version I get no intellisense when writing the props.
This is extremely frustrating because I would like to use Exact Types for the various advantages it gives, however given the dev experience is severely lacking I dont think it will be worthwhile.
Any questions let me know. Interesting to hear thoughts on this.
The text was updated successfully, but these errors were encountered: