#+END_SRC
*** irony
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (use-package irony
- :ensure t
- :config
- (add-hook 'c++-mode-hook 'irony-mode)
- (add-hook 'c-mode-hook 'irony-mode)
- (add-hook 'objc-mode-hook 'irony-mode))
-#+END_SRC
-
+**** install irony server
Install clang, on mac, it has =libclang.dylib=, but no develop headers. Install by =brew=
#+BEGIN_SRC sh
brew install llvm --with-clang
/Users/peli3/.emacs.d/elpa/irony-20160713.1245/server && cmake --build . --use-stderr --config Release --target install
#+END_SRC
+**** irony config
irony-mode-hook, copied from [[https://github.com/Sarcasm/irony-mode][irony-mode]] github
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package irony
+ :ensure t
+ :config
+ (add-hook 'c++-mode-hook 'irony-mode)
+ (add-hook 'c-mode-hook 'irony-mode)
+ (add-hook 'objc-mode-hook 'irony-mode))
+
;; replace the `completion-at-point' and `complete-symbol' bindings in
;; irony-mode's buffers by irony-mode's function
+
(defun my-irony-mode-hook ()
(define-key irony-mode-map [remap completion-at-point]
'irony-completion-at-point-async)
(use-package company-irony
:ensure t)
- (eval-after-load 'company
- '(add-to-list 'company-backends 'company-irony))
-
(use-package flycheck-irony
:ensure t)
- (eval-after-load 'flycheck
- '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
+ (use-package company-c-headers
+ :ensure t)
+
+ (with-eval-after-load 'company
+ (add-to-list 'company-backends '(company-irony company-c-headers)))
+
+
+ (with-eval-after-load 'flycheck
+ (add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
#+END_SRC
*** gtags
(use-package yasnippet
:ensure t
:defer t
- :config
- (add-hook 'prog-mode-hook #'yas-minor-mode)
- ;; (yas-global-mode 1)
+ ;; :config
)
+ ;; (yas-reload-all)
+ ;; (add-hook 'prog-mode-hook #'yas-minor-mode)
+ ;; (yas-global-mode 1)
+
#+END_SRC
*** semantic
(use-package google-c-style
:ensure t
:config
- (add-hook 'c-mode-hook 'google-set-c-style))
+ (add-hook 'c-mode-hook 'google-set-c-style)
+ (add-hook 'c++-mode-hook 'google-set-c-style))
#+END_SRC
** Lua