Emacs: Only format C++ buffers in source trees with .clang-format file

This commit is contained in:
Riyyi
2022-08-06 10:48:00 +02:00
parent 92fa2f52d8
commit 68a2c75bbc
+3 -1
View File
@@ -229,7 +229,9 @@ Language Server Protocol.
(list
(if (and (eq major-mode 'c++-mode)
(bound-and-true-p lsp-mode)
(project-current))
(or
(locate-dominating-file "." ".clang-format")
(locate-dominating-file "." "_clang-format")))
t
nil))))
(when (car lsp-in-cpp-project-cache)