diff --git a/lsp-mode.el b/lsp-mode.el index 8fc0fd1144..4910c0ca1e 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -4062,7 +4062,8 @@ Applies on type formatting." (->> (lsp-session) (lsp-session-folders) (--first (and (lsp--files-same-host it file-name) - (f-ancestor-of? it file-name)))))) + (or (f-ancestor-of? it file-name) + (string= it file-name))))))) (defun lsp-on-revert () "Executed when a file is reverted.