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

LSP-rust-analyzer

by sublimelsp ST4

Convenience package for rust-analyzer

Labels lsp, rust

Details

Installs

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

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.