From: João Távora Date: Fri, 4 May 2018 13:29:40 +0000 (+0100) Subject: Use rooturi instead of rootpath X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~640 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=42733a1e9fd0501217857f98560ddbbe461aa0d0;p=emacs.git Use rooturi instead of rootpath * eglot.el (eglot--connect) (eglot--current-buffer-VersionedTextDocumentIdentifier): Use eglot--uri. (eglot--uri): New function. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b305ca303c3..8e39591a70d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -221,9 +221,9 @@ SUCCESS-FN with no args if all goes well." proc :initialize (eglot--obj :processId (emacs-pid) - :rootPath (concat - (expand-file-name (car (project-roots - (project-current))))) + :rootUri (eglot--uri + (expand-file-name (car (project-roots + (project-current))))) :initializationOptions [] :capabilities (eglot--client-capabilities)) :success-fn @@ -666,6 +666,8 @@ identifier. ERROR is non-nil if this is a JSON-RPC error." (apply #'format format args) :warning))) +(defun eglot--uri (path) "Add file:// to PATH." (concat "file://" path)) + ;;; Minor modes ;;; @@ -988,10 +990,10 @@ running. INTERACTIVE is t if called interactively." (defun eglot--current-buffer-VersionedTextDocumentIdentifier () "Compute VersionedTextDocumentIdentifier object for current buffer." (eglot--obj :uri - (concat "file://" - (url-hexify-string - (file-truename buffer-file-name) - url-path-allowed-chars)) + (eglot--uri + (url-hexify-string + (file-truename buffer-file-name) + url-path-allowed-chars)) ;; FIXME: later deal with workspaces :version eglot--versioned-identifier))