Browse Source

Fix and improve syntax of the hooks

master
Riyyi 5 years ago
parent
commit
90ba4526b9
  1. 45
      .emacs.d/config.org

45
.emacs.d/config.org

@ -278,13 +278,16 @@ Autocomplete packages (includes code completion and snippets).
(company-idle-delay 0.2) (company-idle-delay 0.2)
(company-minimum-prefix-length 2) (company-minimum-prefix-length 2)
(company-tooltip-align-annotations 't) (company-tooltip-align-annotations 't)
:init :hook
(add-hook 'c-mode-common-hook 'company-mode) ((c-mode-common
(add-hook 'emacs-lisp-mode-hook 'company-mode) emacs-lisp-mode
(add-hook 'latex-mode-hook 'company-mode) latex-mode
(add-hook 'org-mode-hook 'company-mode) org-mode
(add-hook 'shell-mode-hook 'company-mode) php-mode
(add-hook 'shell-script-mode-hook 'company-mode)) shell-mode
shell-script-mode)
. company-mode)
)
#+END_SRC #+END_SRC
**** Flycheck **** Flycheck
@ -295,11 +298,13 @@ On the fly syntax checking.
(use-package flycheck (use-package flycheck
:defer t :defer t
:hook :hook
((c-mode ((c-mode-common
c++-mode emacs-lisp-mode
latex-mode
org-mode org-mode
php-mode php-mode
shell-mode) shell-mode
shell-script-mode)
. flycheck-mode)) . flycheck-mode))
#+END_SRC #+END_SRC
@ -310,7 +315,7 @@ On the fly syntax checking.
:defer t :defer t
:hook :hook
((c-mode ; clangd ((c-mode ; clangd
c-or-c++-mode ; clangd c++-mode ; clangd
php-mode) ; nodejs-intelephense php-mode) ; nodejs-intelephense
. lsp-deferred) . lsp-deferred)
:custom :custom
@ -359,9 +364,10 @@ On the fly syntax checking.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package yasnippet (use-package yasnippet
:defer t :defer t
:init :hook
(add-hook 'org-mode-hook #'yas-minor-mode) ((org-mode
(add-hook 'prog-mode-hook #'yas-minor-mode) prog-mode)
. yas-minor-mode)
:config (yas-reload-all)) :config (yas-reload-all))
(use-package yasnippet-snippets (use-package yasnippet-snippets
@ -373,12 +379,13 @@ On the fly syntax checking.
Irony requires M-x =irony-install-server=. Irony requires M-x =irony-install-server=.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package irony (use-package irony
:defer t :defer t
:init :hook
(add-hook 'c++-mode-hook 'irony-mode) ((c-mode
(add-hook 'c-mode-hook 'irony-mode) c++-mode)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) . irony-mode)
(irony-mode . irony-cdb-autosetup-compile-options)
:config (push 'glsl-mode irony-supported-major-modes)) :config (push 'glsl-mode irony-supported-major-modes))
(use-package company-irony (use-package company-irony

Loading…
Cancel
Save