diff --git a/bootstrap.el b/bootstrap.el index 6a3fe5b80..20cff4c27 100644 --- a/bootstrap.el +++ b/bootstrap.el @@ -73,6 +73,11 @@ (setq narf-current-theme narf-default-theme narf-current-font narf-default-font) ;; 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 diff --git a/core/core-file-templates.el b/core/core-autoinsert.el similarity index 97% rename from core/core-file-templates.el rename to core/core-autoinsert.el index bd3ea575f..bf3ba0b9d 100644 --- a/core/core-file-templates.el +++ b/core/core-autoinsert.el @@ -1,4 +1,4 @@ -;;; core-file-templates.el +;;; core-autoinsert.el (use-package autoinsert :after yasnippet @@ -99,5 +99,5 @@ ("\\.z?sh$" "__" sh-mode) ))) -(provide 'core-file-templates) -;;; core-file-templates.el ends here +(provide 'core-autoinsert) +;;; core-autoinsert.el ends here diff --git a/core/core-defuns.el b/core/core-defuns.el index 4a08ea81c..296a9d757 100644 --- a/core/core-defuns.el +++ b/core/core-defuns.el @@ -59,11 +59,13 @@ Examples: (list func-or-forms))) (forms '())) (mapc - (lambda (f) (let ((func (cond ((symbolp f) `(quote ,f)) - (t `(lambda (&rest _) ,@func-or-forms))))) - (mapc - (lambda (h) (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms)) - (if (listp hook) hook (list hook))))) funcs) + (lambda (f) + (let ((func (cond ((symbolp f) `(quote ,f)) + (t `(lambda (&rest _) ,@func-or-forms))))) + (mapc + (lambda (h) + (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms)) + (-list hook)))) funcs) `(progn ,@forms))) (defmacro associate! (mode &rest rest) diff --git a/core/core-editor.el b/core/core-editor.el index f6a94e654..721b0c166 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -8,7 +8,7 @@ require-final-newline t delete-trailing-lines nil - fill-column 90 + fill-column 80 line-spacing 0 word-wrap t truncate-lines t @@ -55,8 +55,9 @@ (with-demoted-errors (when (boundp list) (set list (mapcar #'substring-no-properties (eval list)))))) - '(kill-ring minibuffer-history helm-grep-history helm-ff-history file-name-history - read-expression-history extended-command-history evil-ex-history))) + '(kill-ring minibuffer-history helm-grep-history helm-ff-history + file-name-history read-expression-history extended-command-history + evil-ex-history))) (add-hook 'kill-emacs-hook #'unpropertize-savehist) (add-hook 'savehist-save-hook #'unpropertize-savehist) @@ -64,8 +65,8 @@ (require 'recentf) (setq recentf-save-file (concat narf-temp-dir "/recentf") recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$" - "emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$" "wg-default" - "/company-statistics-cache.el$") + "emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$" + "wg-default" "/company-statistics-cache.el$") recentf-max-menu-items 0 recentf-max-saved-items 250 recentf-auto-cleanup 600) @@ -75,9 +76,10 @@ (use-package editorconfig :config (editorconfig-mode +1) + (associate! editorconfig-conf-mode :match "/\\.?editorconfig$") ;; So whitespace in tabs indentation mode - (add-hook! 'editorconfig-custom-hooks (if indent-tabs-mode (whitespace-mode +1))) - (associate! editorconfig-conf-mode :match "/\\.?editorconfig$")) + (add-hook! 'editorconfig-custom-hooks + (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) (save-excursion (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) ;; @@ -219,8 +222,10 @@ enable multiple minor modes for the same regexp.") (display-string (format " ... " (count-lines (overlay-start ov) (overlay-end ov))))) (put-text-property 0 1 'display - (list 'right-fringe 'hs-marker 'hs-fringe-face) marker-string) - (put-text-property 0 (length display-string) 'face 'hs-face display-string) + (list 'right-fringe 'hs-marker 'hs-fringe-face) + marker-string) + (put-text-property 0 (length display-string) + 'face 'hs-face display-string) (overlay-put ov 'before-string marker-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) :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 :config @@ -281,8 +287,11 @@ enable multiple minor modes for the same regexp.") (sp-pair "[" nil :post-handlers '(("| " " ")) :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 '(sh-mode markdown-mode) "`" "`" :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 + '(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-local-pair "" :post-handlers '(("| " "SPC"))))) diff --git a/core/core-evil.el b/core/core-evil.el index 43a7053e5..5f2def826 100644 --- a/core/core-evil.el +++ b/core/core-evil.el @@ -92,7 +92,8 @@ ;; Fix harmless (yet disruptive) error reporting w/ hidden buffers caused by ;; workgroups killing 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)) ;; Hide keystroke display while isearch is active @@ -110,8 +111,10 @@ (def-repeat! evil-snipe-X evil-snipe-repeat evil-snipe-repeat-reverse)) (after! evil-visualstar - (def-repeat! evil-visualstar/begin-search-forward 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-visualstar/begin-search-forward + 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-previous evil-ex-search-next evil-ex-search-previous) diff --git a/core/core-ui.el b/core/core-ui.el index aa8c13641..e21adb0dc 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -81,9 +81,12 @@ (global-eldoc-mode -1)) ;; Highlight TODO/FIXME/NOTE tags -(defface narf-todo-face '((t (:inherit font-lock-warning-face))) "Face for TODOs") -(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") +(defface narf-todo-face '((t (:inherit font-lock-warning-face))) + "Face for TODOs") +(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) (font-lock-add-keywords nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend) @@ -125,16 +128,16 @@ visual-fill-column-width fill-column)) (use-package highlight-indentation - :commands (highlight-indentation-mode highlight-indentation-current-column-mode) + :commands (highlight-indentation-mode + highlight-indentation-current-column-mode) :init (add-hook! (nxml-mode yaml-mode json-mode scss-mode c-mode-common ruby-mode python-mode lua-mode) 'highlight-indentation-mode) (after! editorconfig - (defun narf*hl-indent-guess-offset () - (string-to-int (gethash 'indent_size (editorconfig-get-properties)))) - (advice-add 'highlight-indentation-guess-offset :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 ;; highlight-indentation-mode can display them consistently) @@ -160,17 +163,19 @@ (use-package rainbow-mode :commands (rainbow-mode) :init - ;; NOTE: 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))) + ;; 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))) (use-package nlinum :commands nlinum-mode :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-line nil) - (defvar nlinum-format "%4d ") - (setq linum-format "%3d ") + (defface linum-highlight-face '((t (:inherit linum))) + "Face for line highlights") :init (add-hook! (markdown-mode prog-mode scss-mode web-mode conf-mode) @@ -202,27 +207,28 @@ ;; Custom modeline segments (spaceline-define-segment *buffer-path - (concat (when buffer-file-name - (powerline-raw - (f-dirname - (let ((buffer-path (file-relative-name buffer-file-name (narf/project-root))) - (max-length (truncate (/ (window-body-width) 1.75)))) - (concat (projectile-project-name) "/" - (if (> (length buffer-path) max-length) - (let ((path (reverse (split-string buffer-path "/" t))) - (output "")) - (when (and path (equal "" (car path))) - (setq path (cdr path))) - (while (and path (<= (length output) (- max-length 4))) - (setq output (concat (car path) "/" output)) - (setq path (cdr path))) - (when path - (setq output (concat "../" output))) - (when (string-suffix-p "/" output) - (setq output (substring output 0 -1))) - output) - buffer-path)))) - (if active 'mode-line-buffer-path))) + (concat + (when buffer-file-name + (powerline-raw + (f-dirname + (let ((buffer-path (f-relative buffer-file-name (narf/project-root))) + (max-length (truncate (/ (window-body-width) 1.75)))) + (concat (projectile-project-name) "/" + (if (> (length buffer-path) max-length) + (let ((path (reverse (split-string buffer-path "/" t))) + (output "")) + (when (and path (equal "" (car path))) + (setq path (cdr path))) + (while (and path (<= (length output) (- max-length 4))) + (setq output (concat (car path) "/" output)) + (setq path (cdr path))) + (when path + (setq output (concat "../" output))) + (when (string-suffix-p "/" output) + (setq output (substring output 0 -1))) + output) + buffer-path)))) + (if active 'mode-line-buffer-path))) (powerline-raw "%b" (if active 'mode-line-buffer-file))) :tight-right t) @@ -257,7 +263,8 @@ "Version control info" (when (and active vc-mode) (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)) :tight-right t) @@ -278,21 +285,23 @@ anzu to be enabled." :tight t) (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) (propertize (let ((this-oc (iedit-find-current-occurrence-overlay)) - (length (or (ignore-errors (length iedit-occurrences-overlays)) 0))) - (format " %s/%s " - (save-excursion - (unless this-oc - (iedit-prev-occurrence) - (setq this-oc (iedit-find-current-occurrence-overlay))) - (if this-oc - ;; NOTE: Not terribly reliable - (- length (-elem-index this-oc iedit-occurrences-overlays)) - "-")) - length)) + (length (or (ignore-errors (length iedit-occurrences-overlays)) 0))) + (format + " %s/%s " + (save-excursion + (unless this-oc + (iedit-prev-occurrence) + (setq this-oc (iedit-find-current-occurrence-overlay))) + (if this-oc + ;; NOTE: Not terribly reliable + (- length (-elem-index this-oc iedit-occurrences-overlays)) + "-")) + length)) 'face (if active 'mode-line-count-face 'mode-line-inactive))) :tight t) @@ -390,18 +399,21 @@ anzu to be enabled." narf--flycheck-cache) (and (setq narf--flycheck-err-cache flycheck-current-errors) (setq narf--flycheck-cache - (let ((fe (narf--flycheck-count 'error)) - (fw (narf--flycheck-count 'warning)) - ;; (fi (narf--flycheck-count 'info)) - ) + (let ((fe (narf/-flycheck-count 'error)) + (fw (narf/-flycheck-count 'warning))) (concat - (if fe (propertize (format " ⚠%s " fe) 'face (if active 'spaceline-flycheck-error 'mode-line))) - (if fw (propertize (format " ⚠%s " fw) 'face (if active 'spaceline-flycheck-warning 'mode-line))) - ;; (if fi (propertize (format " ⚠%s " fi) 'face 'spaceline-flycheck-info)) - )))))) + (if fe (propertize (format " ⚠%s " fe) + 'face (if active + 'spaceline-flycheck-error + 'mode-line))) + (if fw (propertize (format " ⚠%s " fw) + 'face (if active + 'spaceline-flycheck-warning + 'mode-line))))))))) :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 "Padding, to ensure the mode-line is `powerline-height' pixels tall" narf--mode-line-padding diff --git a/core/core.el b/core/core.el index 0317b1663..e3ebce211 100644 --- a/core/core.el +++ b/core/core.el @@ -2,16 +2,16 @@ ;; ;;; Naming conventions: ;; -;; narf-... A public variable/constant or function -;; narf--... An internal variable or function (non-interactive) -;; narf/... An autoloaded interactive function -;; narf:... An ex command -;; narf|... A hook -;; narf*... An advising function -;; narf.... Custom prefix commands -;; ...! Macro +;; narf-… A public variable/constant or function +;; narf--… An internal variable or function (non-interactive) +;; narf/… An autoloaded interactive function +;; narf:… An ex command +;; narf|… A hook +;; narf*… An advising function +;; narf.… Custom prefix commands +;; …! 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 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.") (defvar narf-ignore-buffers '("*Completions*" "*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*" "*Apropos*" "*Help*" "*cvs*" - "*Buffer List*" "*Ibuffer*" "*esh command on file*" - "*WoMan-Log*" "*compilation*" "*use-package*" - "*quickrun*" "*eclim: problems*" "*Flycheck errors*" - "*popwin-dummy*" "*NeoTree*" " *NeoTree*" + "*Buffer List*" "*Ibuffer*" "*NeoTree*" " + *NeoTree*" "*esh command on file*" "*WoMan-Log*" + "*compilation*" "*use-package*" "*quickrun*" + "*eclim: problems*" "*Flycheck errors*" + "*popwin-dummy*" ;; Helm - "*helm*" "*helm recentf*" "*helm projectile*" "*helm imenu*" - "*helm company*" "*helm buffers*" "*Helm Css SCSS*" - "*helm-ag*" "*helm-ag-edit*" "*Helm Swoop*" - "*helm M-x*" "*helm mini*" "*Helm Completions*" - "*Helm Find Files*" "*helm mu*" "*helm mu contacts*" - "*helm-mode-describe-variable*" "*helm-mode-describe-function*" + "*helm*" "*helm recentf*" "*helm projectile*" + "*helm imenu*" "*helm company*" "*helm buffers*" + "*Helm Css SCSS*" "*helm-ag*" "*helm-ag-edit*" + "*Helm Swoop*" "*helm M-x*" "*helm mini*" + "*Helm Completions*" "*Helm Find Files*" + "*helm mu*" "*helm mu contacts*" + "*helm-mode-describe-variable*" + "*helm-mode-describe-function*" ;; Org "*Org todo*" "*Org Links*" "*Agenda Commands*") "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" "mix.exs") "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 (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." (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 () (message ":: Loaded in %s" (emacs-init-time))) diff --git a/init.el b/init.el index 3bbb2585e..5ecd328e0 100644 --- a/init.el +++ b/init.el @@ -6,35 +6,35 @@ ;; ;;; Are you pondering what I'm pondering, Pinky? ;; -;; ,,, !/:. -;; /::\". !!::: -;; :::::\". ," \:,:: -;; ::::::\ ". ,","\::. -;; \:::::":\ "/""v' :' -;; !::::\ ! \ \ __ -;; "::::\ \ ! \.&&&&, -;; ," __ ", cd,&&&&&&' -;; \ ". "" / \&&&" _,--- -;; "",__\_ / _,:"::::: -;; _," ,"" ,-,__,/":,_ ,","::::::: -;; _," ," `'' ::::,",__,,----,,__," /::::::::: -;; ," ,".__, \:::," " /:::":::::/ -;; ," ,/"::::::\ >" (_-"/:::::: -;; / ,"_!:::::::/, ," _,,--, /::::::/ -;; / "" _,"\:::::::' ! ," ){:::::/ -;; ! _," \ "", \,"""-,____,"__,,,"_," _/ -;; ""t" \\ \ "-,_(*)&&&&(*)," \ ." -;; / \", ! , \ ! - ) -;; ! \ "" ! !==!"-,__,' -;; ! \ """_""""`, ", /"_ -;; \ , .l /" " ", \! ,_/ -;; ), \ / \ \/ ,, /! ! -;; ,::\ \," \ ! \/ ! ! -;; _,::::" ) )\ ," ___ \ -,_, ,"",! ! -;; __,,,::::"" ," ,":::,-:::--:" __\_!__/_""-,_! -;; ,,:::""""""" ,:_,""__...._"""::::"" /:::::" "":::::: -;; (:._ l::::::::::::\\/ "" "" -;; """"--,,,--- """" +;; ,,, !/:. +;; /::\". !!::: +;; :::::\". ," \:,:: +;; ::::::\ ". ,","\::. +;; \:::::":\ "/""v' :' +;; !::::\ ! \ \ __ +;; "::::\ \ ! \.&&&&, +;; ," __ ", cd,&&&&&&' +;; \ ". "" / \&&&" _,--- +;; "",__\_ / _,:"::::: +;; _," ,"" ,-,__,/":,_ ,","::::::: +;; _," ," `'' ::::,",__,,----,,__," /::::::::: +;; ," ,".__, \:::," " /:::":::::/ +;; ," ,/"::::::\ >" (_-"/:::::: +;; / ,"_!:::::::/, ," _,,--, /::::::/ +;; / "" _,"\:::::::' ! ," ){:::::/ +;; ! _," \ "", \,"""-,____,"__,,,"_," _/ +;; ""t" \\ \ "-,_(*)&&&&(*)," \ ." +;; / \", ! , \ ! - ) +;; ! \ "" ! !==!"-,__,' +;; ! \ """_""""`, ", /"_ +;; \ , .l /" " ", \! ,_/ +;; ), \ / \ \/ ,, /! ! +;; ,::\ \," \ ! \/ ! ! +;; _,::::" ) )\ ," ___ \ -,_, ,"",! ! +;; __,,,::::"" ," ,":::,-:::--:" __\_!__/_""-,_! +;; ,,:::""""""" ,:_,""__...._"""::::"" /:::::" "":::::: +;; (:._ l::::::::::::\\/ "" "" +;; """"--,,,--- """" ;; ;; These mice are not part of GNU Emacs. ;; @@ -57,53 +57,53 @@ (IS-WINDOWS 'core-os-win32)) ;; The heart of NARF - core-popup ; taming sudden and inevitable windows - core-ui ; draw me like one of your French editors - core-evil ; come to the dark side, we have cookies - core-editor ; filling the editor-shaped hole in the emacs OS - core-company ; for the lazy typist - core-yasnippet ; for the lazier typist - core-file-templates ; for the laziest typist - core-flycheck ; get tazed for every semicolon you forget - core-project ; whose project am I in? - core-vcs ; remember remember, that commit in November - core-helm ; a search engine for life and love - core-workgroups ; cure Emacs alzheimers + tab emulation - core-eval ; run code, run; debug too + core-popup ; taming sudden and inevitable windows + core-ui ; draw me like one of your French editors + core-evil ; come to the dark side, we have cookies + core-editor ; filling the editor-shaped hole in the emacs OS + core-company ; for the lazy typist + core-yasnippet ; for the lazier typist + core-autoinsert ; for the laziest typist + core-flycheck ; get tazed for every semicolon you forget + core-project ; whose project am I in? + core-vcs ; remember remember, that commit in November + core-helm ; a search engine for life and love + core-workgroups ; cure Emacs alzheimers + tab emulation + core-eval ; run code, run; debug too ;; Environments - module-apple ; Applescript, Swift, Launchbar, iOS, wallet syphons, etc. - module-cc ; C/C++/Obj-C madness - module-crystal ; ruby at the speed of c - module-csharp ; unity, .NET, and mono shenanigans - module-data ; config and data formats - module-go ; the hipster dialect - module-haskell ; a language that's lazier than I am - module-java ; the poster child for carpal tunnel syndrome - module-js ; all(hope(abandon(ye(who(enter(here)))))) - module-julia ; MATLAB, but fast - module-latex ; for writing papers in Emacs - module-lisp ; drowning in parentheses - module-lua ; one-based indices? one-based indices. - module-org ; for organized fearless leader - module-php ; making php less painful to work with - module-processing ; pretty prototypes - module-python ; beautiful is better than ugly - module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"} - module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - module-scala ; Java, but good - module-sh ; she sells Z-shells by the C XOR - module-text ; writing docs for people to ignore - module-web ; #big-bang::before { content: ""; } + module-apple ; Applescript, Swift, Launchbar & other wallet syphons + module-cc ; C/C++/Obj-C madness + module-crystal ; ruby at the speed of c + module-csharp ; unity, .NET, and mono shenanigans + module-data ; config and data formats + module-go ; the hipster dialect + module-haskell ; a language that's lazier than I am + module-java ; the poster child for carpal tunnel syndrome + module-js ; all(hope(abandon(ye(who(enter(here)))))) + module-julia ; MATLAB, but fast + module-latex ; for writing papers in Emacs + module-lisp ; drowning in parentheses + module-lua ; one-based indices? one-based indices. + module-org ; for organized fearless leader + module-php ; making php less painful to work with + module-processing ; pretty prototypes + module-python ; beautiful is better than ugly + module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"} + module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + module-scala ; Java, but good + module-sh ; she sells Z-shells by the C XOR + module-text ; writing docs for people to ignore + module-web ; #big-bang::before { content: ""; } ;; Experimental - ;;module-eshell ; for inferior OSes *cough*windows + ;;module-eshell ; for inferior OSes *cough*windows ;; Extra libraries - extra-demo ; allow me to demonstrate... - extra-tags ; if you liked it you should've generated a tag for it - extra-tmux ; close the rift between GUI & terminal - extra-write ; Emacs as a word processor + extra-demo ; allow me to demonstrate... + extra-tags ; if you liked it you should've generated a tag for it + extra-tmux ; close the rift between GUI & terminal + extra-write ; Emacs as a word processor ;; Customization my-bindings diff --git a/modules/module-cc.el b/modules/module-cc.el index b6e857718..7add28f4b 100644 --- a/modules/module-cc.el +++ b/modules/module-cc.el @@ -2,23 +2,23 @@ (use-package cc-mode :commands (c-mode c++-mode objc-mode java-mode) + :mode ("\\.mm" . objc-mode) :init - (associate! objc-mode :match "\\.mm$") (add-hook! c++-mode '(highlight-numbers-mode narf|init-c++-C11-highlights)) (add-hook 'c-initialization-hook 'narf|init-c/c++-settings) ;; C++ header files - (push `(,(lambda () (and (f-ext? buffer-file-name "h") - (or (f-exists? (f-swap-ext buffer-file-name "cpp")) - (awhen (car-safe (projectile-get-other-files (buffer-file-name) (projectile-current-project-files))) - (f-ext? it "cpp"))))) - . c++-mode) + (push (cons (lambda () (and (f-ext? buffer-file-name "h") + (or (f-exists? (f-swap-ext buffer-file-name "cpp")) + (awhen (car-safe (projectile-get-other-files (buffer-file-name) (projectile-current-project-files))) + (f-ext? it "cpp"))))) + 'c++-mode) magic-mode-alist) ;; Obj-C - (push `(,(lambda () (and (f-ext? buffer-file-name "h") - (re-search-forward "@\\" magic-mode-regexp-match-limit t))) - . objc-mode) + (push (cons (lambda () (and (f-ext? buffer-file-name "h") + (re-search-forward "@\\" magic-mode-regexp-match-limit t))) + 'objc-mode) magic-mode-alist) :config @@ -55,7 +55,7 @@ (flycheck-irony-setup) ;; 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)) (flycheck-mode +1) (irony-mode +1) diff --git a/modules/module-go.el b/modules/module-go.el index d5afe8162..24c0fb332 100644 --- a/modules/module-go.el +++ b/modules/module-go.el @@ -6,7 +6,6 @@ :init (add-hook! go-mode '(emr-initialize flycheck-mode go-eldoc-setup)) (add-hook! go-mode (add-hook 'before-save-hook 'gofmt-before-save)) - :config (def-builder! go-mode "go build") (def-company-backend! go-mode (go yasnippet)) @@ -15,7 +14,7 @@ :n "gd" 'godef-jump :n "gD" 'godef-describe (:localleader - :n "p" 'helm-go-package + :n "p" 'helm-go-package :n "tr" 'narf:go-test-run-all :n "ta" 'narf:go-test-run-all :n "ts" 'narf:go-test-run-package))