Skip to content

Tab completion for block-scoped variables doesn't work in REPL #983

Closed

Description

@RB14

Using version 1.4.1 REPL mode, it seems that tab completion for block-scoped variables (i.e. let and const statements) doesn't show suggestions, while tab completion for variables declared with var or otherwise just assigned a value without a deceleration, does show up a list of suggestions.

Of course, this happens in strict mode, or else I couldn't use let and const.

Activity

  1. cjihrig commented on Apr 2, 2016

    @cjihrig
    Contributor

    Is this actually closed? Tab completion of let and const variables isn't working for me.

  2. philj0st commented on May 29, 2016

    @philj0st

    neither is it for me. I'm on node v6.2.0

  3. bnoordhuis commented on May 30, 2016

    @bnoordhuis
    Member

    I'll reopen, it doesn't work with master either.

  4. kaicataldo commented on Jun 25, 2016

    @kaicataldo

    Can confirm that tab completion isn't working for const or let for me in the latest release (v6.2.2), but interestingly, const (but not let) works in v5.11.1.

  5. Fishrock123 commented on Sep 17, 2016

    @Fishrock123
    Contributor

    Anyone know if there is a way to hook into what variables are in the current scope? VM hacks count.

    Would running in/hooking into a new vm module context have this info?

  6. addaleax commented on Sep 17, 2016

    @addaleax
    Member

    @nodejs/v8?

  7. bnoordhuis commented on Sep 18, 2016

    @bnoordhuis
    Member

    Anyone know if there is a way to hook into what variables are in the current scope?

    You can through the debugger API but you have to fake a breakpoint.

    Interestingly though, tab completion for let and const bindings seems to work with master.

  8. targos commented on Sep 20, 2016

    @targos
    Member

    Interestingly though, tab completion for let and const bindings seems to work with master.

    It doesn't seem to work for me. What did you try ?

  9. Fishrock123 commented on Oct 18, 2016

    @Fishrock123
    Contributor

    Just confirmed this still doesn't work on master.

  10. Fishrock123 commented on Oct 18, 2016

    @Fishrock123
    Contributor
  11. fhinkel commented on Oct 18, 2016

    @fhinkel
    Contributor

    I'll check what the debugger does, since it works there.

    If that doesn't work for us, here's a workaround we might try: Since vm intercepts all variable declarations anyways (and REPL sends everything through vm), we could also store the variable names in a list, and then do tab completion using that list. /cc @AnnaMag

  12. self-assigned this
    on Oct 28, 2016
  13. Fishrock123 commented on Nov 8, 2016

    @Fishrock123
    Contributor

    ping @fhinkel did you get anywhere here?

  14. fhinkel commented on Nov 23, 2016

    @fhinkel
    Contributor

    Sorry, didn't get too much time on this yet.

  15. Fishrock123 commented on Mar 24, 2017

    @Fishrock123
    Contributor

    ping @fhinkel, were you ever able to look into this? :D

  16. robahl commented on May 22, 2017

    @robahl

    Help us @fhinkel, you're our only hope!

  17. jasnell commented on May 30, 2017

    @jasnell
    Member

    This appears to no longer be an issue.

  18. targos commented on May 30, 2017

    @targos
    Member

    @jasnell I think it's still an issue. Note that Chrome devtools are also unable to provide completion for let or const variables.

  19. reopened this on May 30, 2017
  20. jasnell commented on May 30, 2017

    @jasnell
    Member

    hmm.... yep, quick verification test shows that I was testing the wrong thing. Thanks for reopening @targos

  21. jgranduel commented on Sep 21, 2017

    @jgranduel

    Hi,
    node-8.5.0 REPL win10... seems to still be an issue. Any news?

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

Metadata

Metadata

Labels

confirmed-bughelp wantedrepl

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions