Emacs: Only format C++ buffers in source trees with .clang-format file
This commit is contained in:
@@ -229,7 +229,9 @@ Language Server Protocol.
|
|||||||
(list
|
(list
|
||||||
(if (and (eq major-mode 'c++-mode)
|
(if (and (eq major-mode 'c++-mode)
|
||||||
(bound-and-true-p lsp-mode)
|
(bound-and-true-p lsp-mode)
|
||||||
(project-current))
|
(or
|
||||||
|
(locate-dominating-file "." ".clang-format")
|
||||||
|
(locate-dominating-file "." "_clang-format")))
|
||||||
t
|
t
|
||||||
nil))))
|
nil))))
|
||||||
(when (car lsp-in-cpp-project-cache)
|
(when (car lsp-in-cpp-project-cache)
|
||||||
|
|||||||
Reference in New Issue
Block a user