diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-14 16:52:21 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-14 16:52:21 +0200 |
commit | 0457aa177da88b6b35e354df2b5d0673d911ee5b (patch) | |
tree | 7eb39fac1361271bab2365cef5538cbed593a912 /.emacs.d/org/config.org | |
parent | Update (diff) | |
download | dotfiles-bsd-0457aa177da88b6b35e354df2b5d0673d911ee5b.tar.gz dotfiles-bsd-0457aa177da88b6b35e354df2b5d0673d911ee5b.tar.bz2 dotfiles-bsd-0457aa177da88b6b35e354df2b5d0673d911ee5b.tar.xz dotfiles-bsd-0457aa177da88b6b35e354df2b5d0673d911ee5b.tar.zst dotfiles-bsd-0457aa177da88b6b35e354df2b5d0673d911ee5b.zip |
Updates
Diffstat (limited to '.emacs.d/org/config.org')
-rw-r--r-- | .emacs.d/org/config.org | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/.emacs.d/org/config.org b/.emacs.d/org/config.org index e5e19c5..889f1c4 100644 --- a/.emacs.d/org/config.org +++ b/.emacs.d/org/config.org @@ -504,14 +504,6 @@ (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) #+END_SRC -*** Auto-complete -#+BEGIN_SRC emacs-lisp -(require 'auto-complete) - -(require 'auto-complete-config) -(ac-config-default) -#+END_SRC - *** C default style #+BEGIN_SRC emacs-lisp (setq c-default-style "bsd") @@ -774,6 +766,33 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) #+END_SRC +*** company + #+BEGIN_SRC emacs-lisp + (require 'company) + (require 'company-irony) + ;; (add-to-list 'company-backends 'company-irony) + ;; (add-to-list 'company-backends 'company-yasnippet) + (add-hook 'after-init-hook 'global-company-mode) + (global-company-mode) + ;; company delay until suggestions are shown + (setq company-idle-delay 0) + + ;; weight by frequency + (setq company-transformers '(company-sort-by-occurrence)) + + ;; Add yasnippet support for all company backends + ;; https://github.com/syl20bnr/spacemacs/pull/179 + (defvar company-mode/enable-yas t "Enable yasnippet for all backends.") + + (defun company-mode/backend-with-yas (backend) + (if (or (not company-mode/enable-yas) (and (listp backend) (member 'company-yasnippet backend))) + backend + (append (if (consp backend) backend (list backend)) + '(:with company-yasnippet)))) + + (setq company-backends (mapcar #'company-mode/backend-with-yas company-backends)) + #+END_SRC + ** Compilation *** Close window after errorless compilation #+BEGIN_SRC emacs-lisp |