Commit 84560917 authored by Fangrui Song's avatar Fangrui Song

expand-file-name

parent e1a28892
......@@ -125,7 +125,8 @@ DIRECTION can be \"D\", \"L\", \"R\" or \"U\"."
(defun ccls--suggest-project-root ()
(and (memq major-mode '(c-mode c++-mode cuda-mode objc-mode))
(locate-dominating-file default-directory ".ccls-root")))
(when-let (dir (locate-dominating-file default-directory ".ccls-root"))
(expand-file-name dir))))
(advice-add 'lsp--suggest-project-root :before-until #'ccls--suggest-project-root)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment