Added clang-include-fixer, but it's broken.

This commit is contained in:
tastytea 2019-09-29 15:09:42 +02:00
parent 03ad4c381e
commit 09812979f0
1 changed files with 16 additions and 3 deletions

19
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file.
;; Time-stamp: <2019-09-29T05:07:36+00:00>
;; Time-stamp: <2019-09-29T13:08:56+00:00>
;;; Commentary:
;; Requires at least Emacs 24.3.
@ -549,9 +549,22 @@ With argument, do this that many times."
(c++-mode . ggtags-mode)
)
(use-package cpp-auto-include
;; Add #include directives for missing symbols.
;; Broken: Can't pass build directory, run-find-all-symbols.py crashes.
(use-package clang-include-fixer
:ensure nil ; Installed by clang.
:if (executable-find "clang-include-fixer")
:init
(defvar my/clang-tool-path
(concat (file-name-directory (executable-find "clang-include-fixer"))
"../share/clang"))
(add-to-list 'load-path my/clang-tool-path)
:config
(defun my/clang-find-all-symbols ()
(shell-command (concat my/clang-tool-path
"/run-find-all-symbols.py -p build")))
:bind
("C-x M-i" . cpp-auto-include)
("C-x M-i" . clang-include-fixer)
)
;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;