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

LSP-rust-analyzer

by sublimelsp ST4 Trending

Convenience package for rust-analyzer

Details

Installs

  • Total 16K
  • Win 5K
  • Mac 4K
  • Linux 6K
Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 2 3 9 7 9 5 5 3 7 3 5 8 13 5 4 4 5 4 7 2 3 8 7 6 7 4 0 4 5 5 3 5 3 9 5 3 4 5 2 3 6 0 2 2 0 2
Mac 1 8 2 4 1 6 3 4 3 3 3 5 2 7 2 5 4 3 6 5 7 1 5 3 2 4 0 5 6 0 1 3 5 5 3 3 3 1 1 2 3 3 1 4 0 5
Linux 1 4 4 6 5 4 3 7 0 1 2 7 7 13 9 3 10 5 5 4 7 10 6 2 5 3 6 1 9 10 6 4 4 5 10 4 7 3 3 4 6 6 3 5 5 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.