General cleanup; core-file-templates -> core-autoinsert

This commit is contained in:
Henrik Lissner 2016-05-12 22:11:43 -04:00
parent 5999c1d5a2
commit 70b4f0d188
10 changed files with 216 additions and 188 deletions

View file

@ -73,6 +73,11 @@
(setq narf-current-theme narf-default-theme (setq narf-current-theme narf-default-theme
narf-current-font narf-default-font) narf-current-font narf-default-font)
;; Here we a'go! ;; Here we a'go!
(mapc 'require packages))) (mapc 'require packages)
(when (display-graphic-p)
(require 'server)
(unless (server-running-p)
(server-start)))))
;;; bootstrap.el ends here ;;; bootstrap.el ends here

View file

@ -1,4 +1,4 @@
;;; core-file-templates.el ;;; core-autoinsert.el
(use-package autoinsert (use-package autoinsert
:after yasnippet :after yasnippet
@ -99,5 +99,5 @@
("\\.z?sh$" "__" sh-mode) ("\\.z?sh$" "__" sh-mode)
))) )))
(provide 'core-file-templates) (provide 'core-autoinsert)
;;; core-file-templates.el ends here ;;; core-autoinsert.el ends here

View file

@ -59,11 +59,13 @@ Examples:
(list func-or-forms))) (list func-or-forms)))
(forms '())) (forms '()))
(mapc (mapc
(lambda (f) (let ((func (cond ((symbolp f) `(quote ,f)) (lambda (f)
(let ((func (cond ((symbolp f) `(quote ,f))
(t `(lambda (&rest _) ,@func-or-forms))))) (t `(lambda (&rest _) ,@func-or-forms)))))
(mapc (mapc
(lambda (h) (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms)) (lambda (h)
(if (listp hook) hook (list hook))))) funcs) (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms))
(-list hook)))) funcs)
`(progn ,@forms))) `(progn ,@forms)))
(defmacro associate! (mode &rest rest) (defmacro associate! (mode &rest rest)

View file

@ -8,7 +8,7 @@
require-final-newline t require-final-newline t
delete-trailing-lines nil delete-trailing-lines nil
fill-column 90 fill-column 80
line-spacing 0 line-spacing 0
word-wrap t word-wrap t
truncate-lines t truncate-lines t
@ -55,8 +55,9 @@
(with-demoted-errors (with-demoted-errors
(when (boundp list) (when (boundp list)
(set list (mapcar #'substring-no-properties (eval list)))))) (set list (mapcar #'substring-no-properties (eval list))))))
'(kill-ring minibuffer-history helm-grep-history helm-ff-history file-name-history '(kill-ring minibuffer-history helm-grep-history helm-ff-history
read-expression-history extended-command-history evil-ex-history))) file-name-history read-expression-history extended-command-history
evil-ex-history)))
(add-hook 'kill-emacs-hook #'unpropertize-savehist) (add-hook 'kill-emacs-hook #'unpropertize-savehist)
(add-hook 'savehist-save-hook #'unpropertize-savehist) (add-hook 'savehist-save-hook #'unpropertize-savehist)
@ -64,8 +65,8 @@
(require 'recentf) (require 'recentf)
(setq recentf-save-file (concat narf-temp-dir "/recentf") (setq recentf-save-file (concat narf-temp-dir "/recentf")
recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$" recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$"
"emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$" "wg-default" "emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$"
"/company-statistics-cache.el$") "wg-default" "/company-statistics-cache.el$")
recentf-max-menu-items 0 recentf-max-menu-items 0
recentf-max-saved-items 250 recentf-max-saved-items 250
recentf-auto-cleanup 600) recentf-auto-cleanup 600)
@ -75,9 +76,10 @@
(use-package editorconfig (use-package editorconfig
:config :config
(editorconfig-mode +1) (editorconfig-mode +1)
(associate! editorconfig-conf-mode :match "/\\.?editorconfig$")
;; So whitespace in tabs indentation mode ;; So whitespace in tabs indentation mode
(add-hook! 'editorconfig-custom-hooks (if indent-tabs-mode (whitespace-mode +1))) (add-hook! 'editorconfig-custom-hooks
(associate! editorconfig-conf-mode :match "/\\.?editorconfig$")) (if indent-tabs-mode (whitespace-mode +1))))
;; ;;
@ -145,7 +147,8 @@ enable multiple minor modes for the same regexp.")
(when (and (eolp) narf-electric-indent-words) (when (and (eolp) narf-electric-indent-words)
(save-excursion (save-excursion
(backward-word) (backward-word)
(looking-at-p (concat "\\<" (regexp-opt narf-electric-indent-words)))))) (looking-at-p
(concat "\\<" (regexp-opt narf-electric-indent-words))))))
electric-indent-functions) electric-indent-functions)
;; ;;
@ -219,8 +222,10 @@ enable multiple minor modes for the same regexp.")
(display-string (format " ... " (count-lines (overlay-start ov) (display-string (format " ... " (count-lines (overlay-start ov)
(overlay-end ov))))) (overlay-end ov)))))
(put-text-property 0 1 'display (put-text-property 0 1 'display
(list 'right-fringe 'hs-marker 'hs-fringe-face) marker-string) (list 'right-fringe 'hs-marker 'hs-fringe-face)
(put-text-property 0 (length display-string) 'face 'hs-face display-string) marker-string)
(put-text-property 0 (length display-string)
'face 'hs-face display-string)
(overlay-put ov 'before-string marker-string) (overlay-put ov 'before-string marker-string)
(overlay-put ov 'display display-string)))))) (overlay-put ov 'display display-string))))))
@ -255,7 +260,8 @@ enable multiple minor modes for the same regexp.")
:commands (rotate-text rotate-text-backward) :commands (rotate-text rotate-text-backward)
:config (push '("true" "false") rotate-text-words)) :config (push '("true" "false") rotate-text-words))
(use-package smart-forward :commands (smart-up smart-down smart-left smart-right)) (use-package smart-forward
:commands (smart-up smart-down smart-left smart-right))
(use-package smartparens (use-package smartparens
:config :config
@ -281,8 +287,11 @@ enable multiple minor modes for the same regexp.")
(sp-pair "[" nil :post-handlers '(("| " " ")) (sp-pair "[" nil :post-handlers '(("| " " "))
:unless '(sp-point-before-word-p sp-point-before-same-p)) :unless '(sp-point-before-word-p sp-point-before-same-p))
(sp-local-pair 'css-mode "/*" "*/" :post-handlers '(("[d-3]||\n[i]" "RET") ("| " "SPC"))) (sp-local-pair
(sp-local-pair '(sh-mode markdown-mode) "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p)) 'css-mode "/*" "*/" :post-handlers '(("[d-3]||\n[i]" "RET") ("| " "SPC")))
(sp-local-pair
'(sh-mode markdown-mode) "`" "`"
:unless '(sp-point-before-word-p sp-point-before-same-p))
(sp-with-modes '(xml-mode nxml-mode php-mode) (sp-with-modes '(xml-mode nxml-mode php-mode)
(sp-local-pair "<!--" "-->" :post-handlers '(("| " "SPC"))))) (sp-local-pair "<!--" "-->" :post-handlers '(("| " "SPC")))))

View file

@ -92,7 +92,8 @@
;; Fix harmless (yet disruptive) error reporting w/ hidden buffers caused by ;; Fix harmless (yet disruptive) error reporting w/ hidden buffers caused by
;; workgroups killing windows ;; workgroups killing windows
;; TODO Delete timer on dead windows ;; TODO Delete timer on dead windows
(defadvice evil-ex-hl-do-update-highlight (around evil-ex-hidden-buffer-ignore-errors activate) (defadvice evil-ex-hl-do-update-highlight
(around evil-ex-hidden-buffer-ignore-errors activate)
(ignore-errors ad-do-it)) (ignore-errors ad-do-it))
;; Hide keystroke display while isearch is active ;; Hide keystroke display while isearch is active
@ -110,8 +111,10 @@
(def-repeat! evil-snipe-X evil-snipe-repeat evil-snipe-repeat-reverse)) (def-repeat! evil-snipe-X evil-snipe-repeat evil-snipe-repeat-reverse))
(after! evil-visualstar (after! evil-visualstar
(def-repeat! evil-visualstar/begin-search-forward evil-ex-search-next evil-ex-search-previous) (def-repeat! evil-visualstar/begin-search-forward
(def-repeat! evil-visualstar/begin-search-backward evil-ex-search-previous evil-ex-search-next)) evil-ex-search-next evil-ex-search-previous)
(def-repeat! evil-visualstar/begin-search-backward
evil-ex-search-previous evil-ex-search-next))
(def-repeat! evil-ex-search-next evil-ex-search-next evil-ex-search-previous) (def-repeat! evil-ex-search-next evil-ex-search-next evil-ex-search-previous)
(def-repeat! evil-ex-search-previous evil-ex-search-next evil-ex-search-previous) (def-repeat! evil-ex-search-previous evil-ex-search-next evil-ex-search-previous)

View file

@ -81,9 +81,12 @@
(global-eldoc-mode -1)) (global-eldoc-mode -1))
;; Highlight TODO/FIXME/NOTE tags ;; Highlight TODO/FIXME/NOTE tags
(defface narf-todo-face '((t (:inherit font-lock-warning-face))) "Face for TODOs") (defface narf-todo-face '((t (:inherit font-lock-warning-face)))
(defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs") "Face for TODOs")
(defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs") (defface narf-fixme-face '((t (:inherit font-lock-warning-face)))
"Face for FIXMEs")
(defface narf-note-face '((t (:inherit font-lock-warning-face)))
"Face for NOTEs")
(add-hook! (prog-mode emacs-lisp-mode) (add-hook! (prog-mode emacs-lisp-mode)
(font-lock-add-keywords (font-lock-add-keywords
nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend) nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend)
@ -125,16 +128,16 @@
visual-fill-column-width fill-column)) visual-fill-column-width fill-column))
(use-package highlight-indentation (use-package highlight-indentation
:commands (highlight-indentation-mode highlight-indentation-current-column-mode) :commands (highlight-indentation-mode
highlight-indentation-current-column-mode)
:init :init
(add-hook! (nxml-mode yaml-mode json-mode scss-mode (add-hook! (nxml-mode yaml-mode json-mode scss-mode
c-mode-common ruby-mode python-mode lua-mode) c-mode-common ruby-mode python-mode lua-mode)
'highlight-indentation-mode) 'highlight-indentation-mode)
(after! editorconfig (after! editorconfig
(defun narf*hl-indent-guess-offset () (advice-add 'highlight-indentation-guess-offset
(string-to-int (gethash 'indent_size (editorconfig-get-properties)))) :override 'narf*hl-indent-guess-offset))
(advice-add 'highlight-indentation-guess-offset :override 'narf*hl-indent-guess-offset))
;; A long-winded method for ensuring whitespace is maintained (so that ;; A long-winded method for ensuring whitespace is maintained (so that
;; highlight-indentation-mode can display them consistently) ;; highlight-indentation-mode can display them consistently)
@ -160,17 +163,19 @@
(use-package rainbow-mode (use-package rainbow-mode
:commands (rainbow-mode) :commands (rainbow-mode)
:init :init
;; NOTE: hl-line-mode and rainbow-mode don't play well together ;; hl-line-mode and rainbow-mode don't play well together
(add-hook! (sass-mode scss-mode less-css-mode) '(rainbow-mode narf|hl-line-off))) (add-hook! (sass-mode scss-mode less-css-mode)
'(rainbow-mode narf|hl-line-off)))
(use-package nlinum (use-package nlinum
:commands nlinum-mode :commands nlinum-mode
:preface :preface
(defface linum-highlight-face '((t (:inherit linum))) "Face for line highlights") (setq linum-format "%3d ")
(defvar nlinum-format "%4d ")
(defvar narf--hl-nlinum-overlay nil) (defvar narf--hl-nlinum-overlay nil)
(defvar narf--hl-nlinum-line nil) (defvar narf--hl-nlinum-line nil)
(defvar nlinum-format "%4d ") (defface linum-highlight-face '((t (:inherit linum)))
(setq linum-format "%3d ") "Face for line highlights")
:init :init
(add-hook! (add-hook!
(markdown-mode prog-mode scss-mode web-mode conf-mode) (markdown-mode prog-mode scss-mode web-mode conf-mode)
@ -202,10 +207,11 @@
;; Custom modeline segments ;; Custom modeline segments
(spaceline-define-segment *buffer-path (spaceline-define-segment *buffer-path
(concat (when buffer-file-name (concat
(when buffer-file-name
(powerline-raw (powerline-raw
(f-dirname (f-dirname
(let ((buffer-path (file-relative-name buffer-file-name (narf/project-root))) (let ((buffer-path (f-relative buffer-file-name (narf/project-root)))
(max-length (truncate (/ (window-body-width) 1.75)))) (max-length (truncate (/ (window-body-width) 1.75))))
(concat (projectile-project-name) "/" (concat (projectile-project-name) "/"
(if (> (length buffer-path) max-length) (if (> (length buffer-path) max-length)
@ -257,7 +263,8 @@
"Version control info" "Version control info"
(when (and active vc-mode) (when (and active vc-mode)
(powerline-raw (powerline-raw
(substring vc-mode (+ 1 (length (symbol-name (vc-backend buffer-file-name))))) (substring
vc-mode (1+ (length (symbol-name (vc-backend buffer-file-name)))))
other-face)) other-face))
:tight-right t) :tight-right t)
@ -278,12 +285,14 @@ anzu to be enabled."
:tight t) :tight t)
(spaceline-define-segment *iedit (spaceline-define-segment *iedit
"Show the number of matches and what match you're on (or after). Requires iedit." "Show the number of matches and what match you're on (or after). Requires
iedit."
(when (bound-and-true-p iedit-mode) (when (bound-and-true-p iedit-mode)
(propertize (propertize
(let ((this-oc (iedit-find-current-occurrence-overlay)) (let ((this-oc (iedit-find-current-occurrence-overlay))
(length (or (ignore-errors (length iedit-occurrences-overlays)) 0))) (length (or (ignore-errors (length iedit-occurrences-overlays)) 0)))
(format " %s/%s " (format
" %s/%s "
(save-excursion (save-excursion
(unless this-oc (unless this-oc
(iedit-prev-occurrence) (iedit-prev-occurrence)
@ -390,18 +399,21 @@ anzu to be enabled."
narf--flycheck-cache) narf--flycheck-cache)
(and (setq narf--flycheck-err-cache flycheck-current-errors) (and (setq narf--flycheck-err-cache flycheck-current-errors)
(setq narf--flycheck-cache (setq narf--flycheck-cache
(let ((fe (narf--flycheck-count 'error)) (let ((fe (narf/-flycheck-count 'error))
(fw (narf--flycheck-count 'warning)) (fw (narf/-flycheck-count 'warning)))
;; (fi (narf--flycheck-count 'info))
)
(concat (concat
(if fe (propertize (format " ⚠%s " fe) 'face (if active 'spaceline-flycheck-error 'mode-line))) (if fe (propertize (format " ⚠%s " fe)
(if fw (propertize (format " ⚠%s " fw) 'face (if active 'spaceline-flycheck-warning 'mode-line))) 'face (if active
;; (if fi (propertize (format " ⚠%s " fi) 'face 'spaceline-flycheck-info)) 'spaceline-flycheck-error
)))))) 'mode-line)))
(if fw (propertize (format " ⚠%s " fw)
'face (if active
'spaceline-flycheck-warning
'mode-line)))))))))
:tight t) :tight t)
(defvar narf--mode-line-padding (pl/percent-xpm powerline-height 100 0 100 0 1 nil nil)) (defvar narf--mode-line-padding
(pl/percent-xpm powerline-height 100 0 100 0 1 nil nil))
(spaceline-define-segment *pad (spaceline-define-segment *pad
"Padding, to ensure the mode-line is `powerline-height' pixels tall" "Padding, to ensure the mode-line is `powerline-height' pixels tall"
narf--mode-line-padding narf--mode-line-padding

View file

@ -2,16 +2,16 @@
;; ;;
;;; Naming conventions: ;;; Naming conventions:
;; ;;
;; narf-... A public variable/constant or function ;; narf- A public variable/constant or function
;; narf--... An internal variable or function (non-interactive) ;; narf-- An internal variable or function (non-interactive)
;; narf/... An autoloaded interactive function ;; narf/ An autoloaded interactive function
;; narf:... An ex command ;; narf: An ex command
;; narf|... A hook ;; narf| A hook
;; narf*... An advising function ;; narf* An advising function
;; narf.... Custom prefix commands ;; narf. Custom prefix commands
;; ...! Macro ;; ! Macro
;; ;;
;; You will find all autoloaded function in {core,modules}/defuns/defuns-*.el ;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
;; ;;
;;; ;;;
@ -95,22 +95,25 @@
ignored when using `narf:next-real-buffer' and `narf:previous-real-buffer', and ignored when using `narf:next-real-buffer' and `narf:previous-real-buffer', and
killed by `narf/kill-unreal-buffers'. killed by `narf/kill-unreal-buffers'.
`narf:kill-this-buffer' will also gloss over these buffers when finding a new `narf/kill-real-buffer' will also gloss over these buffers when finding a new
buffer to display.") buffer to display.")
(defvar narf-ignore-buffers '("*Completions*" "*Compile-Log*" "*inferior-lisp*" (defvar narf-ignore-buffers '("*Completions*" "*Compile-Log*" "*inferior-lisp*"
"*Fuzzy Completions*" "*Apropos*" "*Help*" "*cvs*" "*Fuzzy Completions*" "*Apropos*" "*Help*" "*cvs*"
"*Buffer List*" "*Ibuffer*" "*esh command on file*" "*Buffer List*" "*Ibuffer*" "*NeoTree*" "
"*WoMan-Log*" "*compilation*" "*use-package*" *NeoTree*" "*esh command on file*" "*WoMan-Log*"
"*quickrun*" "*eclim: problems*" "*Flycheck errors*" "*compilation*" "*use-package*" "*quickrun*"
"*popwin-dummy*" "*NeoTree*" " *NeoTree*" "*eclim: problems*" "*Flycheck errors*"
"*popwin-dummy*"
;; Helm ;; Helm
"*helm*" "*helm recentf*" "*helm projectile*" "*helm imenu*" "*helm*" "*helm recentf*" "*helm projectile*"
"*helm company*" "*helm buffers*" "*Helm Css SCSS*" "*helm imenu*" "*helm company*" "*helm buffers*"
"*helm-ag*" "*helm-ag-edit*" "*Helm Swoop*" "*Helm Css SCSS*" "*helm-ag*" "*helm-ag-edit*"
"*helm M-x*" "*helm mini*" "*Helm Completions*" "*Helm Swoop*" "*helm M-x*" "*helm mini*"
"*Helm Find Files*" "*helm mu*" "*helm mu contacts*" "*Helm Completions*" "*Helm Find Files*"
"*helm-mode-describe-variable*" "*helm-mode-describe-function*" "*helm mu*" "*helm mu contacts*"
"*helm-mode-describe-variable*"
"*helm-mode-describe-function*"
;; Org ;; Org
"*Org todo*" "*Org Links*" "*Agenda Commands*") "*Org todo*" "*Org Links*" "*Agenda Commands*")
"List of buffer names to ignore when using `winner-undo', or `winner-redo'") "List of buffer names to ignore when using `winner-undo', or `winner-redo'")
@ -129,7 +132,7 @@ gets killed.")
"gulpfile.js" "Gruntfile.js" "bower.json" "composer.json" "Cargo.toml" "gulpfile.js" "Gruntfile.js" "bower.json" "composer.json" "Cargo.toml"
"mix.exs") "mix.exs")
"A list of files that count as 'project files', which determine whether a "A list of files that count as 'project files', which determine whether a
folder is the root of a project or not.") folder is the root of a project or not.")
;; Fringe/margins ;; Fringe/margins
(defvar narf-fringe-size 6 "Default width to use for the fringes.") (defvar narf-fringe-size 6 "Default width to use for the fringes.")
@ -181,11 +184,6 @@ gets killed.")
"Prevent annoying \"Active processes exist\" query when you quit Emacs." "Prevent annoying \"Active processes exist\" query when you quit Emacs."
(cl-flet ((process-list ())) ad-do-it))) (cl-flet ((process-list ())) ad-do-it)))
(when (display-graphic-p)
(require 'server)
(unless (server-running-p)
(server-start)))
(defun display-startup-echo-area-message () (defun display-startup-echo-area-message ()
(message ":: Loaded in %s" (emacs-init-time))) (message ":: Loaded in %s" (emacs-init-time)))

View file

@ -63,7 +63,7 @@
core-editor ; filling the editor-shaped hole in the emacs OS core-editor ; filling the editor-shaped hole in the emacs OS
core-company ; for the lazy typist core-company ; for the lazy typist
core-yasnippet ; for the lazier typist core-yasnippet ; for the lazier typist
core-file-templates ; for the laziest typist core-autoinsert ; for the laziest typist
core-flycheck ; get tazed for every semicolon you forget core-flycheck ; get tazed for every semicolon you forget
core-project ; whose project am I in? core-project ; whose project am I in?
core-vcs ; remember remember, that commit in November core-vcs ; remember remember, that commit in November
@ -72,7 +72,7 @@
core-eval ; run code, run; debug too core-eval ; run code, run; debug too
;; Environments ;; Environments
module-apple ; Applescript, Swift, Launchbar, iOS, wallet syphons, etc. module-apple ; Applescript, Swift, Launchbar & other wallet syphons
module-cc ; C/C++/Obj-C madness module-cc ; C/C++/Obj-C madness
module-crystal ; ruby at the speed of c module-crystal ; ruby at the speed of c
module-csharp ; unity, .NET, and mono shenanigans module-csharp ; unity, .NET, and mono shenanigans

View file

@ -2,23 +2,23 @@
(use-package cc-mode (use-package cc-mode
:commands (c-mode c++-mode objc-mode java-mode) :commands (c-mode c++-mode objc-mode java-mode)
:mode ("\\.mm" . objc-mode)
:init :init
(associate! objc-mode :match "\\.mm$")
(add-hook! c++-mode '(highlight-numbers-mode narf|init-c++-C11-highlights)) (add-hook! c++-mode '(highlight-numbers-mode narf|init-c++-C11-highlights))
(add-hook 'c-initialization-hook 'narf|init-c/c++-settings) (add-hook 'c-initialization-hook 'narf|init-c/c++-settings)
;; C++ header files ;; C++ header files
(push `(,(lambda () (and (f-ext? buffer-file-name "h") (push (cons (lambda () (and (f-ext? buffer-file-name "h")
(or (f-exists? (f-swap-ext buffer-file-name "cpp")) (or (f-exists? (f-swap-ext buffer-file-name "cpp"))
(awhen (car-safe (projectile-get-other-files (buffer-file-name) (projectile-current-project-files))) (awhen (car-safe (projectile-get-other-files (buffer-file-name) (projectile-current-project-files)))
(f-ext? it "cpp"))))) (f-ext? it "cpp")))))
. c++-mode) 'c++-mode)
magic-mode-alist) magic-mode-alist)
;; Obj-C ;; Obj-C
(push `(,(lambda () (and (f-ext? buffer-file-name "h") (push (cons (lambda () (and (f-ext? buffer-file-name "h")
(re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t))) (re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t)))
. objc-mode) 'objc-mode)
magic-mode-alist) magic-mode-alist)
:config :config
@ -55,7 +55,7 @@
(flycheck-irony-setup) (flycheck-irony-setup)
;; some c-mode dervied modes wrongfully trigger these hooks (like php-mode) ;; some c-mode dervied modes wrongfully trigger these hooks (like php-mode)
(add-hook! (c-mode c++-mode ojbc-mode) (add-hook! (c-mode c++-mode objc-mode)
(when (memq major-mode '(c-mode c++-mode objc-mode)) (when (memq major-mode '(c-mode c++-mode objc-mode))
(flycheck-mode +1) (flycheck-mode +1)
(irony-mode +1) (irony-mode +1)

View file

@ -6,7 +6,6 @@
:init :init
(add-hook! go-mode '(emr-initialize flycheck-mode go-eldoc-setup)) (add-hook! go-mode '(emr-initialize flycheck-mode go-eldoc-setup))
(add-hook! go-mode (add-hook 'before-save-hook 'gofmt-before-save)) (add-hook! go-mode (add-hook 'before-save-hook 'gofmt-before-save))
:config :config
(def-builder! go-mode "go build") (def-builder! go-mode "go build")
(def-company-backend! go-mode (go yasnippet)) (def-company-backend! go-mode (go yasnippet))