File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -2884,7 +2884,7 @@ Applies on type formatting."
2884
2884
(when-let (file-name (or path (buffer-file-name)))
2885
2885
(->> (lsp-session)
2886
2886
(lsp-session-folders)
2887
- (--first (f-ancestor-of? it file-name)))))
2887
+ (--first (f-ancestor-of? it (f-canonical file-name) )))))
2888
2888
2889
2889
(defun lsp-on-revert ()
2890
2890
"Executed when a file is reverted.
@@ -4878,12 +4878,13 @@ Returns nil if the project should not be added to the current SESSION."
4878
4878
4879
4879
(defun lsp-find-session-folder (session file-name)
4880
4880
"Look in the current SESSION for folder containing FILE-NAME."
4881
- (->> session
4882
- (lsp-session-folders)
4883
- (--filter (or (f-same? it file-name)
4884
- (f-ancestor-of? it file-name)))
4885
- (--max-by (> (length it)
4886
- (length other)))))
4881
+ (let ((file-name-canonical (f-canonical file-name)))
4882
+ (->> session
4883
+ (lsp-session-folders)
4884
+ (--filter (or (f-same? it file-name-canonical)
4885
+ (f-ancestor-of? it file-name-canonical)))
4886
+ (--max-by (> (length it)
4887
+ (length other))))))
4887
4888
4888
4889
(defun lsp-find-workspace (server-id file-name)
4889
4890
"Find workspace for SERVER-ID for FILE-NAME."
You can’t perform that action at this time.
0 commit comments