flow / flow-for-vscode

Flow for Visual Studio Code
Other
994 stars 111 forks source link

completions include more than what's reported by `flow autocomplete` #50

Closed kevinbarabash closed 2 years ago

kevinbarabash commented 8 years ago

I see the autocomplete list contains other top-level variables defined in the file and properties on other objects. Is there any way to restrict the list so it only shows what flow autcomplete returns?

Running flow autocomplete when my cursor is right after React. gives the following:

Children any
Component React$Component<DefaultProps, Props, State>
DOM any
Element React$Element<Config>
PropTypes { /* omitted */ }
PureComponent React$PureComponent<DefaultProps, Props, State>
cloneElement 
constructAndRenderComponent <Config>(name: ReactClass<Config>, config: Config, container: any) => React$Component<$DefaultPropsOf<Config>, $PropsOf<Config>, any>
constructAndRenderComponentByID <Config>(name: ReactClass<Config>, config: Config, id: string) => React$Component<$DefaultPropsOf<Config>, $PropsOf<Config>, any>
createClass (spec: any) => ReactClass<any>
createElement <Config>(name: ReactClass<Config>, config: Config, children: any) => React$Element<Config> & <Config>(fn: (config: Config, context: any) => React$Element<Config>, config: Config, children: any) => React$Element<Config>
createFactory <Config>(name: ReactClass<Config>) => (config: Config, children?: any) => React$Element<Config>
findDOMNode (object: React$Component<any, any, any> | HTMLElement) => any
hasOwnProperty (prop: any) => boolean
initializeTouchEvents (shouldUseTouch: boolean) => void
isPrototypeOf (o: any) => boolean
isValidElement (element: any) => boolean
propertyIsEnumerable (prop: any) => boolean
render <Config>(element: React$Element<Config>, container: any) => React$Component<$DefaultPropsOf<Config>, $PropsOf<Config>, any>
renderToStaticMarkup (element: React$Element<any>) => string
renderToString (element: React$Element<any>) => string
toLocaleString () => string
toString () => string
unmountComponentAtNode (container: any) => boolean
valueOf () => Object
version string
withContext (context: any, callback: () => void) => any
orta commented 7 years ago

I wonder if these are coming from VS Code's JavaScript itself - http://stackoverflow.com/a/30793338/385754

gcazaciuc commented 7 years ago

opened this discussion a while ago in vscode repo: https://github.com/Microsoft/vscode/issues/15738 . It is the typescript intellisense that kicks in and currently there is no way for extensions to prevent autocomplete results from other extensions.

orta commented 7 years ago

I see, so once https://github.com/Microsoft/vscode/issues/17068 is PR + merged, we can recommend that you can disable the typescript extension just for your current project.