Skip to content

gather list of tools that do have autocomplete working #2

Open

Description

@bmeck

Particularly, given in a node project:

import 'fs'|
  //       ^ caret

They can perform some kind of completion for the binding names so that you end up with things like:

// caret position not important on the modified line
import {readFile} from 'fs'

I do not have editor/tooling that I currently use that does this without custom configuration. It seems that if no tooling does this by default, finding the reason why would be good.

Activity

  1. hax commented on Apr 30, 2020

    @hax

    I guess one reason of "not by default", is programmers need to know it to make it work. For example, how can I know import 'fs' could have autocomplete? If I don't know, I will always write import {readFile} first.

    IMO, the only discoverable way is creating a snippet import {} from '|' automatically or at least give a hint when you enter import |.

  2. bmeck commented on Apr 2, 2021

    @bmeck
    OwnerAuthor

    Typescript is just now adding support ( https://devblogs.microsoft.com/typescript/announcing-typescript-4-3-beta/#import-statement-completions ), but they did reach out and state the status quo is a performance concern. CC: @DanielRosenwasser

  3. DanielRosenwasser commented on Apr 2, 2021

    @DanielRosenwasser

    @andrewbranch did a lot of work to uncover existing inefficiencies and exploit different levels of caching to make this work well. He can speak more to this.

    It remains to be seen whether this really alleviates the pain. I'm not huge on deferring to tooling to fix this but it might be enough. You can try it out in VS Code Insiders with the TypeScript/JavaScript Nightly extension.

  4. andrewbranch commented on Apr 2, 2021

    @andrewbranch

    I will also point out that the feature we just added in TypeScript is obviously only useful to developers who already have some idea what a given module exports. Sometimes when I install an unfamiliar module, requesting completions at import { | } from "unfamiliar-module" is enough to get me started using it, but seeing every possibility at import | won’t help me at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions