From 1650a59c360903ba3173c21938660241c6c854fc Mon Sep 17 00:00:00 2001 From: Chizi123 <joelgrun@gmail.com> Date: Sun, 06 Jan 2019 07:59:19 +0000 Subject: [PATCH] fixed syntax to make company load better --- config.org | 252 ++++++++++++++++++++++++++----------------------- 1 files changed, 134 insertions(+), 118 deletions(-) diff --git a/config.org b/config.org index 5aa556b..e7788fe 100644 --- a/config.org +++ b/config.org @@ -110,6 +110,7 @@ (use-package projectile :ensure t :bind ("C-c p" . projectile-command-map) + :diminish projectile-mode :config (projectile-global-mode) (setq projectile-completion-system 'helm) @@ -170,6 +171,13 @@ (find-file "~/.emacs.d/config.org")) (global-set-key (kbd "C-c e d") 'config-visit) #+END_SRC +** Go to init.el +#+BEGIN_SRC emacs-lisp + (defun init-visit () + (interactive) + (find-file "~/.emacs.d/init.el")) + (global-set-key (kbd "C-c e i") 'init-visit) +#+END_SRC ** Reload configuration #+BEGIN_SRC emacs-lisp (defun config-reload () @@ -194,6 +202,7 @@ #+BEGIN_SRC emacs-lisp (use-package rainbow-mode :ensure t + :diminish rainbow-mode :init (add-hook 'prog-mode-hook 'rainbow-mode)) #+END_SRC @@ -256,6 +265,7 @@ #+BEGIN_SRC emacs-lisp (use-package undo-tree :ensure t + :diminish undo-tree-mode :config (global-undo-tree-mode)) #+END_SRC @@ -264,6 +274,7 @@ #+BEGIN_SRC emacs-lisp (use-package volatile-highlights :ensure t + :diminish volatile-highlights-mode :config (volatile-highlights-mode t)) #+END_SRC @@ -272,6 +283,7 @@ #+BEGIN_SRC emacs-lisp (use-package workgroups2 :ensure t + :diminish workgroups-mode :config (workgroups-mode 1)) #+END_SRC @@ -410,13 +422,14 @@ * Programming tweaks ** Yasnippet #+BEGIN_SRC emacs-lisp - (use-package yasnippet - :ensure t - :diminish yas-minor-mode - :config - (use-package yasnippet-snippets - :ensure t) - (yas-reload-all)) + (use-package yasnippet + :ensure t + :diminish yas-minor-mode + :config + (use-package yasnippet-snippets + :ensure t) + (yas-reload-all) + (yas-global-mode 1)) #+END_SRC ** flycheck #+BEGIN_SRC emacs-lisp @@ -436,120 +449,11 @@ #+BEGIN_SRC emacs-lisp (use-package company :ensure t - :hook (prog-mode) + :diminish company-mode :config + (add-hook 'prog-mode-hook 'company-mode) (setq company-idle-delay 0) (setq company-minimum-prefix-length 3)) -#+END_SRC -** Language specific configs -*** C/C++ -**** yasnippet -#+BEGIN_SRC emacs-lisp -(add-hook 'c++-mode-hook 'yas-minor-mode) -(add-hook 'c-mode-hook 'yas-minor-mode) -#+END_SRC -**** flycheck clang -#+BEGIN_SRC emacs-lisp -(use-package flycheck-clang-analyzer - :ensure t - :config - (with-eval-after-load 'flycheck - (require 'flycheck-clang-analyzer) - (flycheck-clang-analyzer-setup))) -#+END_SRC -**** company -#+BEGIN_SRC emacs-lisp - (add-hook 'c-mode-common-hook - (lambda () - (define-key c-mode-base-map [(tab)] 'company-complete)))) - - (use-package company-c-headers - :ensure t - :after company - :config - (add-hook 'c++-mode-hook 'company-mode) - (add-hook 'c-mode-hook 'company-mode)) - - (use-package company-irony - :ensure t - :config - (add-to-list company-backends '((company-c-headers - company-dabbrev-code - company-irony)))) - - (use-package irony - :ensure t - :config - (add-hook 'c++-mode-hook 'irony-mode) - (add-hook 'c-mode-hook 'irony-mode) - (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)) -#+END_SRC -*** emacs-lisp -**** eldoc -#+BEGIN_SRC emacs-lisp -(add-hook 'emacs-lisp-mode-hook 'eldoc-mode) -#+END_SRC -**** yasnippet -#+BEGIN_SRC emacs-lisp -(add-hook 'emacs-lisp-mode-hook 'yas-minor-mode) -#+END_SRC -**** company -#+BEGIN_SRC emacs-lisp -(add-hook 'emacs-lisp-mode-hook 'company-mode) - -(use-package slime - :ensure t - :config - (setq inferior-lisp-program "/usr/bin/sbcl") - (setq slime-contribs '(slime-fancy))) - -(use-package slime-company - :ensure t - :init - (require 'company) - (slime-setup '(slime-fancy slime-company))) -#+END_SRC -*** x86 -**** x86-lookup -#+BEGIN_SRC emacs-lisp -(use-package x86-lookup - :ensure t - :init - (setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf") - :bind ("C-h x" . x86-lookup)) -#+END_SRC -*** Latex -**** AucTex -#+BEGIN_SRC emacs-lisp -(use-package tex - :ensure auctex - :config - (setq TeX-auto-save t) - (setq TeX-parse-self t) - (setq doc-view-ghostscript-program "c:/msys64/mingw64/bin/gswin32c.exe") - (setq preview-gs-command "c:/msys64/mingw64/bin/gs.exe")) -#+END_SRC -**** Company -#+BEGIN_SRC emacs-lisp - (use-package company-math - :ensure t - :after company - :config - (add-to-list 'company-backends 'company-math-symbols-unicode)) -#+END_SRC -**** Preview pane -#+BEGIN_SRC emacs-lisp -(use-package latex-preview-pane - :ensure t - :config - (latex-preview-pane-enable)) -#+END_SRC -*** PlantUML -#+BEGIN_SRC emacs-lisp -(use-package plantuml-mode - :ensure t - :init - (setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")) #+END_SRC ** Magit #+BEGIN_SRC emacs-lisp @@ -643,6 +547,116 @@ :map c++-mode-map ("M-RET" . 'srefactor-refactor-at-point))) #+END_SRC +** Language specific configs +*** C/C++ +**** yasnippet +#+BEGIN_SRC emacs-lisp +(add-hook 'c++-mode-hook 'yas-minor-mode) +(add-hook 'c-mode-hook 'yas-minor-mode) +#+END_SRC +**** flycheck clang +#+BEGIN_SRC emacs-lisp +(use-package flycheck-clang-analyzer + :ensure t + :config + (with-eval-after-load 'flycheck + (require 'flycheck-clang-analyzer) + (flycheck-clang-analyzer-setup))) +#+END_SRC +**** company +#+BEGIN_SRC emacs-lisp + (add-hook 'c-mode-common-hook + (lambda () + (define-key c-mode-base-map [(tab)] 'company-complete))) + + (use-package company-c-headers + :ensure t + :after company + :config + (add-hook 'c++-mode-hook 'company-mode) + (add-hook 'c-mode-hook 'company-mode)) + + (use-package company-irony + :ensure t + :config + (add-to-list 'company-backends '(company-c-headers + company-dabbrev-code + company-irony))) + + (use-package irony + :ensure t + :config + (add-hook 'c++-mode-hook 'irony-mode) + (add-hook 'c-mode-hook 'irony-mode) + (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)) +#+END_SRC +*** emacs-lisp +**** eldoc +#+BEGIN_SRC emacs-lisp +(add-hook 'emacs-lisp-mode-hook 'eldoc-mode) +#+END_SRC +**** yasnippet +#+BEGIN_SRC emacs-lisp +(add-hook 'emacs-lisp-mode-hook 'yas-minor-mode) +#+END_SRC +**** company +#+BEGIN_SRC emacs-lisp +(add-hook 'emacs-lisp-mode-hook 'company-mode) + +(use-package slime + :ensure t + :config + (setq inferior-lisp-program "/usr/bin/sbcl") + (setq slime-contribs '(slime-fancy))) + +(use-package slime-company + :ensure t + :init + (require 'company) + (slime-setup '(slime-fancy slime-company))) +#+END_SRC +*** x86 +**** x86-lookup +#+BEGIN_SRC emacs-lisp +(use-package x86-lookup + :ensure t + :init + (setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf") + :bind ("C-h x" . x86-lookup)) +#+END_SRC +*** Latex +**** AucTex +#+BEGIN_SRC emacs-lisp +(use-package tex + :ensure auctex + :config + (setq TeX-auto-save t) + (setq TeX-parse-self t) + (setq doc-view-ghostscript-program "c:/msys64/mingw64/bin/gswin32c.exe") + (setq preview-gs-command "c:/msys64/mingw64/bin/gs.exe")) +#+END_SRC +**** Company +#+BEGIN_SRC emacs-lisp + (use-package company-math + :ensure t + :after company + :config + (add-to-list 'company-backends 'company-math-symbols-unicode)) +#+END_SRC +**** Preview pane +#+BEGIN_SRC emacs-lisp +(use-package latex-preview-pane + :ensure t + :config + (latex-preview-pane-enable)) +#+END_SRC +*** PlantUML +#+BEGIN_SRC emacs-lisp +(use-package plantuml-mode + :ensure t + :init + (setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")) +#+END_SRC * Org mode ** Up to date org #+BEGIN_SRC emacs-lisp @@ -658,6 +672,8 @@ (setq org-export-with-smart-quotes t) (setq org-src-window-setup 'current-window) (add-hook 'org-mode-hook 'org-indent-mode) +(diminish 'org-indent-mode) +(diminish 'visual-line-mode) #+END_SRC ** Line wrapping #+BEGIN_SRC emacs-lisp -- Gitblit v1.9.3