emacs - disable ido flex matching
[dotfiles.git] / emacs.d / config.org
index 3a49d06..4bae6f0 100644 (file)
@@ -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
@@ -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