fix(cc): remove executable-find formatter check
This commit is contained in:
parent
26819c33f3
commit
cc9bda36c2
1 changed files with 11 additions and 12 deletions
|
@ -48,18 +48,17 @@ This is ignored by ccls.")
|
|||
(set-docsets! 'c-mode "C")
|
||||
(set-docsets! 'c++-mode "C++" "Boost")
|
||||
(set-electric! '(c-mode c++-mode objc-mode java-mode) :chars '(?\n ?\} ?\{))
|
||||
(when (executable-find "clang-format")
|
||||
(set-formatter!
|
||||
'clang-format
|
||||
'("clang-format"
|
||||
"-assume-filename"
|
||||
(or (buffer-file-name)
|
||||
(cdr (assoc major-mode
|
||||
'((c-mode . ".c")
|
||||
(c++-mode . ".cpp")
|
||||
(cuda-mode . ".cu")
|
||||
(protobuf-mode . ".proto"))))))
|
||||
:modes '(c-mode c++-mode protobuf-mode cuda-mode)))
|
||||
(set-formatter!
|
||||
'clang-format
|
||||
'("clang-format"
|
||||
"-assume-filename"
|
||||
(or (buffer-file-name)
|
||||
(cdr (assoc major-mode
|
||||
'((c-mode . ".c")
|
||||
(c++-mode . ".cpp")
|
||||
(cuda-mode . ".cu")
|
||||
(protobuf-mode . ".proto"))))))
|
||||
:modes '(c-mode c++-mode protobuf-mode cuda-mode))
|
||||
(set-rotate-patterns! 'c++-mode
|
||||
:symbols '(("public" "protected" "private")
|
||||
("class" "struct")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue