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

LSP-rust-analyzer

by sublimelsp ST4

Convenience package for rust-analyzer

Details

  • 1.10.1
  • github.​com
  • github.​com
  • 2 months ago
  • 58 minutes ago
  • 3 years ago

Installs

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

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.