]> git.lizzy.rs Git - rust.git/commitdiff
Added instructions for Sublime Text 3 setup
authorMathieu Amiot <amiot.mathieu@gmail.com>
Fri, 19 Apr 2019 09:50:01 +0000 (11:50 +0200)
committerMathieu Amiot <amiot.mathieu@gmail.com>
Fri, 19 Apr 2019 09:50:01 +0000 (11:50 +0200)
docs/user/README.md

index 33dd4f9950bf11b8e10568415004709c35b473e7..0196bf45fab6c306a77266c789294ac3b26c0ea7 100644 (file)
@@ -78,3 +78,30 @@ Installation:
 to load path and require it in `init.el`
 * run `lsp` in a rust buffer
 * (Optionally) bind commands like `rust-analyzer-join-lines` or `rust-analyzer-extend-selection` to keys
+
+
+## Sublime Text 3
+
+Prequisites:
+
+`LSP` package.
+
+Installation:
+
+* Invoke the command palette with <kbd>Ctrl+Shift+P</kbd>
+* Type `LSP Settings` to open the LSP preferences editor
+* Add the following LSP client definition to your settings:
+
+```json
+"rust-analyzer": {
+    "command": ["rustup", "run", "stable", "ra_lsp_server"],
+    "languageId": "rust",
+    "scopes": ["source.rust"],
+    "syntaxes": [
+        "Packages/Rust/Rust.sublime-syntax",
+        "Packages/Rust Enhanced/RustEnhanced.sublime-syntax"
+    ]
+}
+```
+
+* You can now invoke the command palette and type LSP enable to locally/globally enable the rust-analyzer LSP (type LSP enable, then choose either locally or globally, then select rust-analyzer)