Skip to content

Enter key doesn't work in *.rs files #823

Closed

Description

@Aloso

I installed rust-analyzer ~ 10 min ago.

When I press Enter or Shift+Enter, nothing happens. Only Ctrl+Enter works. Only rust files are affected.

VS Code: 1.31.1
OS: Manjaro (Linux 4.19) with KDE Plasma
Keyboard: German

Activity

  1. matklad commented on Feb 13, 2019

    @matklad
    Contributor

    That probably means rust analyzer is not actually working. Does the "Rust Analyzer: Status" command works?

  2. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    No, it doesn't. Can I fix it?

  3. matklad commented on Feb 13, 2019

    @matklad
    Contributor

    Probably, but we need to figure out what's wrong in the first place :)

    Is there "rust-analyzer" section in the "Output" tab of the vs code panel?

  4. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    The tab is empty.

  5. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    I'm confused, because when I hover over a struct or trait name, the definition is shown. Doesn't this mean that ra is working?

  6. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    I just re-installed it. Now the output says:

    [Error - 21:23:15] Request textDocument/hover failed.
      Message: content modified
      Code: -32801 
    [Error - 21:23:16] Request textDocument/hover failed.
      Message: content modified
      Code: -32801
    ERROR [ra_lsp_server::main_loop] unknown request: RawRequest { id: 26, method: "m/decorationsRequest", params: Object({"uri": String("file:///home/ludwig/Develop/glutin_2018/src/lib.rs")}) }
    
  7. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    When I press Enter, this is printed to the output:

    ERROR [ra_lsp_server::main_loop] unknown request: RawRequest { id: 113, method: "m/onEnter", params: Object({"position": Object({"character": Number(0), "line": Number(39)}), "textDocument": Object({"uri": String("file:///home/ludwig/Develop/glutin_2018/src/tests.rs")})}) }
    
  8. matklad commented on Feb 13, 2019

    @matklad
    Contributor

    ERROR [ra_lsp_server::main_loop] unknown request: RawRequest { id: 26, method: "m/decorationsRequest", params: Object({"uri": String("file:///home/ludwig/Develop/glutin_2018/src/lib.rs")}) }

    That means that you use a severely outdated version of the VS Code extension. Have you installed the analyzer from the master branch using cargo install-code command?

  9. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    Yes, I did. However, I just did a git pull, then cargo install-lsp and cargo install-code, and now Enter works.

  10. matklad commented on Feb 13, 2019

    @matklad
    Contributor

    Note that we could have renamed the plugin itself (probably? I don't remember), so it might be a good idea to check vscode extensions list for a stale one.

  11. Aloso commented on Feb 13, 2019

    @Aloso
    Author

    No, there's only one plugin. But it's possible that forgot cargo install-lsp the first time, so an outdated version was used. Thanks anyway for the help ;)

  12. DJMcNab commented on Feb 13, 2019

    @DJMcNab
    Contributor

    We have renamed the plugin I think.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions