Skip to content

Update the Sublime Text section #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -374,22 +374,19 @@ if executable('rust-analyzer')
endif
----

=== Sublime Text 3
=== Sublime Text

Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.

You also need the `LSP` package.
To install it:
==== Sublime Text 4:
* Follow the instructions in link:https://github.com/sublimelsp/LSP-rust-analyzer[LSP-rust-analyzer].

1. If you've never installed a Sublime Text package, install Package Control:
* Open the command palette (Win/Linux: `ctrl+shift+p`, Mac: `cmd+shift+p`)
* Type `Install Package Control`, press enter
2. In the command palette, run `Package control: Install package`, and in the list that pops up, type `LSP` and press enter.
NOTE: Install link:https://packagecontrol.io/packages/LSP-file-watcher-chokidar[LSP-file-watcher-chokidar] to enable file watching (`workspace/didChangeWatchedFiles`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this sounds like a bug in rust-analyzer, could you check that after rust-lang/rust-analyzer#11151 this is not actually requried?


Finally, with your Rust project open, in the command palette, run `LSP: Enable Language Server In Project` or `LSP: Enable Language Server Globally`, then select `rust-analyzer` in the list that pops up to enable the rust-analyzer LSP.
The latter means that rust-analyzer is enabled by default in Rust projects.
==== Sublime Text 3:
* Install the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
* Install the link:https://packagecontrol.io/packages/LSP[LSP package].
* From the command palette, run `LSP: Enable Language Server Globally` and select `rust-analyzer`.

If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side of the bottom bar, and after waiting a bit, functionality like tooltips on hovering over variables should become available.
If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side of the status bar, and after waiting a bit, functionalities like tooltips on hovering over variables should become available.

If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>> section on installing the language server binary.

Expand Down