diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-15 05:03:50 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-15 05:03:50 +0000 |
commit | cd9e93aa14cccb57c4fd9afd93068399db40d837 (patch) | |
tree | 8e3b8a3755760de22c6b4f3c003e814a813cf212 /editors | |
parent | eb4d6cf25f9ba886f4aa8ee46149af2807baae7f (diff) | |
parent | c656bf3946268d9d0b87174af6e26d32075dfe01 (diff) |
Merge #977
977: Fix ra-emacs-lsp for newest lsp-mode with native json support r=matklad a=flodiebold
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/emacs/ra-emacs-lsp.el | 9 |
1 files changed, 4 insertions, 5 deletions
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) |