Skip to content

Commit

Permalink
fix when dir-local-find-file return string first time
Browse files Browse the repository at this point in the history
When searching .dir-locals.el first time in a project (not in
dir-locals-directory-cache), dir-local-find-file will return string instead of a
list
  • Loading branch information
fuyu0425 committed Oct 3, 2024
1 parent cdeb496 commit 4109bb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lsp-bridge.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4109bb6

Please sign in to comment.