]> git.lizzy.rs Git - rust.git/commitdiff
Fix ra-emacs-lsp for newest lsp-mode with native json support
authorFlorian Diebold <florian.diebold@freiheit.com>
Thu, 14 Mar 2019 21:08:37 +0000 (22:08 +0100)
committerFlorian Diebold <florian.diebold@freiheit.com>
Thu, 14 Mar 2019 21:08:37 +0000 (22:08 +0100)
editors/emacs/ra-emacs-lsp.el

index 780182f8aa817ffcc5e9459d0a9a6a199bbca114..955703edbafb1dec9a7d3c1d7aec37c4d2192227 100644 (file)
 
 (defun rust-analyzer--apply-source-change (data)
   ;; TODO fileSystemEdits
-  (--each (-> data (ht-get "workspaceEdit") (ht-get "documentChanges"))
+  (seq-doseq (it (-> data (ht-get "workspaceEdit") (ht-get "documentChanges")))
     (rust-analyzer--apply-text-document-edit it))
   (-when-let (cursor-position (ht-get data "cursorPosition"))
     (let ((filename (rust-analyzer--uri-filename (ht-get cursor-position "textDocument")))
           (position (ht-get cursor-position "position")))
       (find-file filename)
-      (rust-analyzer--goto-lsp-loc position)
-      )))
+      (rust-analyzer--goto-lsp-loc position))))
 
 (defun rust-analyzer--apply-source-change-command (p)
-  (let ((data (-> p (ht-get "arguments") (car))))
+  (let ((data (-> p (ht-get "arguments") (seq-first))))
     (rust-analyzer--apply-source-change data)))
 
 (lsp-register-client
      "rust-analyzer/extendSelection"
      (rust-analyzer--extend-selection-params)))
    (ht-get "selections")
-   (car)))
+   (seq-first)))
 
 (defun rust-analyzer--add-er-expansion ()
   (make-variable-buffer-local 'er/try-expand-list)