X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=4bae6f018662665e13ac9d337f6134495ea91ebc;hb=acffaa7fabd3f9f497206e4207dfb6629bf2a502;hp=ce1075ca02147fca95abf1c59343e30cb80a3550;hpb=e45ca5d694a10922dd88a8222234cda00f424c59;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index ce1075c..4bae6f0 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -340,9 +340,7 @@ Enable rainbow mode in emacs lisp mode * Mode-line ** clean mode line - clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][Marstering Emacs]] - #+BEGIN_SRC emacs-lisp :tangle yes :results silent (defvar mode-line-cleaner-alist `((auto-complete-mode . " α") @@ -397,9 +395,7 @@ clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replac #+END_SRC ** Powerline mode - Install powerline mode [[https://github.com/milkypostman/powerline][powerline]] - #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package powerline :ensure t @@ -525,7 +521,7 @@ set height in mode line #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package ido :ensure t - :init (setq ido-enable-flex-matching t + :init (setq ido-enable-flex-matching nil ido-ignore-extensions t ido-use-virtual-buffers t ido-everywhere t) @@ -542,9 +538,9 @@ set height in mode line #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package flx-ido :ensure t - :init (setq ido-enable-flex-matching t + :init (setq ido-enable-flex-matching nil ido-use-faces nil) - :config (flx-ido-mode 1)) + :config (flx-ido-mode nil)) #+END_SRC ** IDO-vertically @@ -1101,6 +1097,8 @@ Toggle an eshell in split window below, refer [[http://www.howardism.org/Technic #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package exec-path-from-shell :ensure t + :init + (setq exec-path-from-shell-check-startup-files nil) :config (exec-path-from-shell-initialize)) #+END_SRC @@ -1712,6 +1710,7 @@ to call =compilation= interactively. (use-package flycheck :ensure t) #+END_SRC + *** irony #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package irony @@ -1728,7 +1727,7 @@ Install clang, on mac, it has =libclang.dylib=, but no develop headers. Install #+END_SRC then install irony searver, and =LIBCLANG_LIBRARY= and =LIBCLANG_INCLUDE_DIR= accordingly -#+BEGIN_SRC emacs-lisp :tangle yes :results silent +#+BEGIN_SRC emacs-lisp :tangle no :results silent (irony-install-server) #+END_SRC @@ -1739,6 +1738,34 @@ then install irony searver, and =LIBCLANG_LIBRARY= and =LIBCLANG_INCLUDE_DIR= ac /Users/peli3/.emacs.d/elpa/irony-20160713.1245/server && cmake --build . --use-stderr --config Release --target install #+END_SRC +irony-mode-hook, copied from [[https://github.com/Sarcasm/irony-mode][irony-mode]] github +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + ;; 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) + (define-key irony-mode-map [remap complete-symbol] + 'irony-completion-at-point-async)) + (add-hook 'irony-mode-hook 'my-irony-mode-hook) + (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) +#+END_SRC + +irony-company +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (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)) +#+END_SRC + *** yasnippet #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package yasnippet