aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/README.md2
-rw-r--r--editors/code/package.json3
-rw-r--r--editors/emacs/ra-emacs-lsp.el9
3 files changed, 7 insertions, 7 deletions
diff --git a/editors/README.md b/editors/README.md
index 6e1189cad..ddc6ee048 100644
--- a/editors/README.md
+++ b/editors/README.md
@@ -1,5 +1,5 @@
1 1
2Preqrequisites: 2Prerequisites:
3 3
4In order to build the VS Code plugin, you need to have node.js and npm with 4In order to build the VS Code plugin, you need to have node.js and npm with
5a minimum version of 10 installed. Please refer to 5a minimum version of 10 installed. Please refer to
diff --git a/editors/code/package.json b/editors/code/package.json
index 0a1e84b4a..3834f2847 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -46,7 +46,8 @@
46 "activationEvents": [ 46 "activationEvents": [
47 "onLanguage:rust", 47 "onLanguage:rust",
48 "onCommand:rust-analyzer.analyzerStatus", 48 "onCommand:rust-analyzer.analyzerStatus",
49 "onCommand:rust-analyzer.collectGarbage" 49 "onCommand:rust-analyzer.collectGarbage",
50 "workspaceContains:**/Cargo.toml"
50 ], 51 ],
51 "main": "./out/extension", 52 "main": "./out/extension",
52 "contributes": { 53 "contributes": {
diff --git a/editors/emacs/ra-emacs-lsp.el b/editors/emacs/ra-emacs-lsp.el
index 780182f8a..955703edb 100644
--- a/editors/emacs/ra-emacs-lsp.el
+++ b/editors/emacs/ra-emacs-lsp.el
@@ -58,17 +58,16 @@
58 58
59(defun rust-analyzer--apply-source-change (data) 59(defun rust-analyzer--apply-source-change (data)
60 ;; TODO fileSystemEdits 60 ;; TODO fileSystemEdits
61 (--each (-> data (ht-get "workspaceEdit") (ht-get "documentChanges")) 61 (seq-doseq (it (-> data (ht-get "workspaceEdit") (ht-get "documentChanges")))
62 (rust-analyzer--apply-text-document-edit it)) 62 (rust-analyzer--apply-text-document-edit it))
63 (-when-let (cursor-position (ht-get data "cursorPosition")) 63 (-when-let (cursor-position (ht-get data "cursorPosition"))
64 (let ((filename (rust-analyzer--uri-filename (ht-get cursor-position "textDocument"))) 64 (let ((filename (rust-analyzer--uri-filename (ht-get cursor-position "textDocument")))
65 (position (ht-get cursor-position "position"))) 65 (position (ht-get cursor-position "position")))
66 (find-file filename) 66 (find-file filename)
67 (rust-analyzer--goto-lsp-loc position) 67 (rust-analyzer--goto-lsp-loc position))))
68 )))
69 68
70(defun rust-analyzer--apply-source-change-command (p) 69(defun rust-analyzer--apply-source-change-command (p)
71 (let ((data (-> p (ht-get "arguments") (car)))) 70 (let ((data (-> p (ht-get "arguments") (seq-first))))
72 (rust-analyzer--apply-source-change data))) 71 (rust-analyzer--apply-source-change data)))
73 72
74(lsp-register-client 73(lsp-register-client
@@ -126,7 +125,7 @@
126 "rust-analyzer/extendSelection" 125 "rust-analyzer/extendSelection"
127 (rust-analyzer--extend-selection-params))) 126 (rust-analyzer--extend-selection-params)))
128 (ht-get "selections") 127 (ht-get "selections")
129 (car))) 128 (seq-first)))
130 129
131(defun rust-analyzer--add-er-expansion () 130(defun rust-analyzer--add-er-expansion ()
132 (make-variable-buffer-local 'er/try-expand-list) 131 (make-variable-buffer-local 'er/try-expand-list)