From 89a37be5123e2af804a7d2f5f96f8ce8de70f39c Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Tue, 29 Aug 2017 21:05:06 +0100 Subject: [PATCH] Add company mode --- init.el | 4 +++- modules/programming.el | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index ca2a9f0..607ea68 100644 --- a/init.el +++ b/init.el @@ -58,7 +58,8 @@ ;; -------------------------------------------------------------------------- ;; Change file in which custom variable changes are saved. ;; -------------------------------------------------------------------------- - (setq custom-file "~/.emacs.d/custom.el") + + (setq-default custom-file "~/.emacs.d/custom.el") ;; *********************************************************************** ;; @@ -121,6 +122,7 @@ ;; -------------------------------------------------------------------------- ;; Load any custom variables. ;; -------------------------------------------------------------------------- + (load custom-file 'noerror) ) ;; Reset garbage collection settings. diff --git a/modules/programming.el b/modules/programming.el index 66531a8..a4df50c 100644 --- a/modules/programming.el +++ b/modules/programming.el @@ -18,7 +18,8 @@ (setq init-packages/programming-packages - '(yasnippet) + '(company + yasnippet) ) @@ -26,6 +27,16 @@ (defun init-packages/init-programming () + ;; -------------------------------------------------------------------------- + ;; Company - complete anything. + ;; -------------------------------------------------------------------------- + + (use-package company + :init + (add-hook 'after-init-hook 'global-company-mode) + :config + (setq company-backends (delete 'company-clang company-backends))) + ;; -------------------------------------------------------------------------- ;; Enable yasnippet. ;; --------------------------------------------------------------------------