diff --git a/lsp-bridge.el b/lsp-bridge.el index f4a5ce4a72..77460eb001 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -981,7 +981,10 @@ So we build this macro to restore postion after code format." ;; Fetch project root path by `lsp-bridge-get-project-path-by-filepath' if it set by user. (funcall lsp-bridge-get-project-path-by-filepath filename) ;; Otherwise try to search up `.dir-locals.el' file - (car (dir-locals-find-file filename)))) + (let ((result (dir-locals-find-file filename))) + (if (consp result) + (car result) + result)))) (defun lsp-bridge--get-language-id-func (project-path file-path server-name extension-name) (if lsp-bridge-get-language-id