Skip to content

Commit

Permalink
Add follow symlink feature to lsp-f-canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin committed Jul 16, 2023
1 parent 5550e12 commit fdc113f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,8 @@ FORMAT and ARGS i the same as for `message'."
(defalias 'lsp-file-local-name 'file-local-name)

(defun lsp-f-canonical (file-name)
"Return the canonical FILE-NAME, without a trailing slash."
(directory-file-name (expand-file-name file-name)))
"Return the canonical FILE-NAME, without a trailing slash (follow symlink)."
(directory-file-name (file-truename (expand-file-name file-name))))

(defalias 'lsp-canonical-file-name 'lsp-f-canonical)

Expand Down

0 comments on commit fdc113f

Please sign in to comment.