ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-rust-analyzer

by sublimelsp ST4

Convenience package for rust-analyzer

Details

Installs

  • Total 14K
  • Win 5K
  • Mac 4K
  • Linux 6K
Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27
Windows 1 2 0 11 3 5 6 6 1 4 2 8 5 9 6 4 7 4 3 2 4 2 4 4 7 3 2 3 5 5 2 10 6 3 6 3 3 9 4 7 4 5 5 3 3 4
Mac 2 5 2 4 3 3 3 3 0 1 4 2 1 5 2 4 1 2 4 1 3 3 4 2 4 1 2 4 5 3 2 2 2 2 2 1 4 4 3 3 1 1 2 8 2 3
Linux 2 4 5 5 10 4 5 2 2 2 3 3 5 10 5 8 9 12 8 4 5 2 5 1 7 13 6 8 6 7 4 6 6 3 8 5 3 9 5 9 5 5 4 6 9 4

Readme

Source
raw.​githubusercontent.​com

LSP-rust-analyzer

This is a helper package that starts the rust-analyzer language server for you.

Installation

  1. Install LSP via Package Control.
  2. Install LSP-rust-analyzer via Package Control.
  3. (Recommended) Install the LSP-file-watcher-chokidar via Package Control to enable functionality to notify the server about changed files.

Configuration

You can edit the global settings by opening the Preferences: LSP-rust-analyzer Settings from the Command Palette.

You can also have a project-specific configuration. Run the Project: Edit Project from the Command Palette and edit the following in the settings object.

{
    // folders: [
    //   ...
    // ]
    "settings": {
        "LSP": {
            "rust-analyzer": {
                "settings": {
                    //Setting-here
                }
            }
        }
    }
}

Applicable Selectors

This language server operates on views with the source.rust base scope.

Installation Location

The server binary is automatically downloaded to $CACHE/Package Storage/LSP-rust-analyzer.

Custom Command Palette Commands

LSP-rust-analyzer: Run…

Select a cargo command from the submenu. This spawns a shell with Terminus for tests, checks and executing code.

Note: The Terminus package needs to be installed for this functionality.

Example

LSP-rust-analyzer: Join Lines

Joins lines accounting for rust-specific logic.

Also bound to the default join-lines key binding (ctrlshiftj or commandshiftj on Windows/Linux and Mac respectively).

LSP-rust-analyzer: Move Item Down / Move Item Up

Moves item under cursor/selection in specified direction.

LSP-rust-analyzer: Open Docs Under Cursor

Opens the URL to documentation for the symbol under the cursor, if available.

LSP-rust-analyzer: Reload Project

Reloads the project metadata, i.e. runs cargo metadata again.

LSP-rust-analyzer: Expand Macro Recursively

Shows the full macro expansion of the macro at current cursor.