No NARF, only DOOM

This commit is contained in:
Henrik Lissner 2016-05-20 22:37:30 -04:00
parent a984bf4f26
commit ad225d2591
104 changed files with 1404 additions and 1409 deletions

View file

@ -1,6 +1,6 @@
;;; defuns-cc.el --- for module-cc.el
(defun narf--c-lineup-inclass (langelem)
(defun doom--c-lineup-inclass (langelem)
(let ((inclass (assoc 'inclass c-syntactic-context)))
(save-excursion
(goto-char (c-langelem-pos inclass))
@ -10,7 +10,7 @@
'++))))
;;;###autoload
(defun narf/c-lineup-arglist (orig-fun &rest args)
(defun doom/c-lineup-arglist (orig-fun &rest args)
"Improve indentation of continued C++11 lambda function opened as argument."
(if (and (eq major-mode 'c++-mode)
(ignore-errors
@ -23,7 +23,7 @@
(apply orig-fun args)))
;;;###autoload
(defun narf|init-c/c++-settings ()
(defun doom|init-c/c++-settings ()
(when (memq major-mode '(c-mode c++-mode objc-mode))
(c-toggle-electric-state -1)
(c-toggle-auto-newline -1)
@ -33,7 +33,7 @@
(c-set-offset 'brace-list-open '+) ; all "opens" should be indented by the c-indent-level
(c-set-offset 'case-label '+) ; indent case labels by c-indent-level, too
(c-set-offset 'access-label '-)
(c-set-offset 'inclass 'narf--c-lineup-inclass)
(c-set-offset 'inclass 'doom--c-lineup-inclass)
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-close '0)
;; Certain mappings interfere with smartparens and custom bindings
@ -52,11 +52,11 @@
(define-key c++-mode-map "}" nil)
;; FIXME: fix smartparens
;; (define-key c++-mode-map ">" nil)
(map! :map (c-mode-base-map c++-mode-map) :i ">" 'narf/autoclose->-maybe)
(map! :map (c-mode-base-map c++-mode-map) :i ">" 'doom/autoclose->-maybe)
(define-key c++-mode-map "<" nil)))
;;;###autoload
(defun narf/autoclose->-maybe ()
(defun doom/autoclose->-maybe ()
"For some reason smartparens won't autoskip >'s, this hack does."
(interactive)
(if (save-excursion
@ -65,22 +65,22 @@
(forward-char)
(call-interactively 'self-insert-command)))
(defun narf--copy-face (new-face face)
(defun doom--copy-face (new-face face)
"Define NEW-FACE from existing FACE."
(copy-face face new-face)
(eval `(defvar ,new-face nil))
(set new-face new-face))
;;;###autoload
(defun narf|init-c++-C11-highlights ()
(defun doom|init-c++-C11-highlights ()
;; C++11 syntax support (until cc-mode is updated)
(require 'font-lock)
;; labels, case, public, private, protected, namespace-tags
(narf--copy-face 'font-lock-label-face 'font-lock-keyword-face)
(doom--copy-face 'font-lock-label-face 'font-lock-keyword-face)
;; comment markups such as Javadoc-tags
(narf--copy-face 'font-lock-doc-markup-face 'font-lock-doc-face)
(doom--copy-face 'font-lock-doc-markup-face 'font-lock-doc-face)
;; comment markups
(narf--copy-face 'font-lock-doc-string-face 'font-lock-comment-face)
(doom--copy-face 'font-lock-doc-string-face 'font-lock-comment-face)
(setq font-lock-maximum-decoration t)
;; We could place some regexes into `c-mode-common-hook', but
@ -119,7 +119,7 @@
) t))
;;;###autoload
(defun narf/append-semicolon ()
(defun doom/append-semicolon ()
"Append a semicolon to the end of this (or each selected) non-empty line."
(interactive)
(let ((beg (if (evil-visual-state-p) evil-visual-beginning (line-beginning-position)))
@ -137,12 +137,12 @@
(evil-normal-state))))
;;;###autoload
(defun narf/sp-point-is-template-p (id action context)
(defun doom/sp-point-is-template-p (id action context)
(and (sp-in-code-p id action context)
(sp-point-after-word-p id action context)))
;;;###autoload
(defun narf/sp-point-after-include-p (id action context)
(defun doom/sp-point-after-include-p (id action context)
(and (sp-in-code-p id action context)
(save-excursion
(goto-char (line-beginning-position))

View file

@ -1,7 +1,7 @@
;;; defuns-scss.el
;;;###autoload
(defun narf/css-toggle-inline-or-block ()
(defun doom/css-toggle-inline-or-block ()
"Toggles between a SCSS multiline block and one-line block."
(interactive)
(save-excursion
@ -28,10 +28,10 @@
(just-one-space)))))
;;;###autoload
(defalias 'narf/sass-build 'narf/scss-build)
(defalias 'doom/sass-build 'doom/scss-build)
;;;###autoload
(defun narf/scss-build ()
(defun doom/scss-build ()
"Compile all sass/scss files in project"
(interactive)
(let ((scss-dir (f-slash (or (f-traverse-upwards (lambda (d)

View file

@ -1,9 +1,9 @@
;;; defuns-eshell.el ---
;;; defuns-eshell.el
(defun narf--eshell-in-prompt-p (&optional offset)
(defun doom--eshell-in-prompt-p (&optional offset)
(>= (- (point) (or offset 0)) (save-excursion (eshell-bol) (point))))
(defun narf--eshell-current-git-branch ()
(defun doom--eshell-current-git-branch ()
(let ((branch (car (loop for match in (split-string (shell-command-to-string "git branch") "\n")
when (string-match "^\*" match)
collect match))))
@ -12,48 +12,48 @@
"")))
;;;###autoload
(defun narf/eshell-prompt ()
(defun doom/eshell-prompt ()
(concat (propertize (abbreviate-file-name (eshell/pwd)) 'face 'eshell-prompt)
(propertize (narf--eshell-current-git-branch) 'face 'font-lock-function-name-face)
(propertize (doom--eshell-current-git-branch) 'face 'font-lock-function-name-face)
(propertize " $ " 'face 'font-lock-constant-face)))
;;;###autoload
(defun narf/eshell-evil-append ()
(defun doom/eshell-evil-append ()
(interactive)
(goto-char (point-max))
(call-interactively 'evil-append))
;;;###autoload
(defun narf/eshell-evil-append-maybe ()
(defun doom/eshell-evil-append-maybe ()
(interactive)
(if (narf--eshell-in-prompt-p)
(if (doom--eshell-in-prompt-p)
(call-interactively 'evil-insert)
(narf/eshell-append)))
(doom/eshell-append)))
;;;###autoload
(defun narf/eshell-evil-prepend ()
(defun doom/eshell-evil-prepend ()
(interactive)
(eshell-bol)
(call-interactively 'evil-insert))
;;;###autoload
(defun narf/eshell-evil-prepend-maybe ()
(defun doom/eshell-evil-prepend-maybe ()
(interactive)
(if (narf--eshell-in-prompt-p)
(if (doom--eshell-in-prompt-p)
(call-interactively 'evil-insert)
(narf/eshell-prepend)))
(doom/eshell-prepend)))
;;;###autoload
(defun narf/eshell-evil-replace-maybe ()
(defun doom/eshell-evil-replace-maybe ()
(interactive)
(if (narf--eshell-in-prompt-p)
(if (doom--eshell-in-prompt-p)
(call-interactively 'evil-replace)
(user-error "Cannot edit read-only region")))
;;;###autoload
(defun narf/eshell-evil-replace-state-maybe ()
(defun doom/eshell-evil-replace-state-maybe ()
(interactive)
(if (narf--eshell-in-prompt-p)
(if (doom--eshell-in-prompt-p)
(call-interactively 'evil-replace-state)
(user-error "Cannot edit read-only region")))

View file

@ -1,18 +1,18 @@
;;; defuns-go.el
;; TODO Implement narf:go-get-package
(defun narf--go-get-package ())
;; TODO Implement doom:go-get-package
(defun doom--go-get-package ())
;;;###autoload
(defun narf:go-test-run-all ()
(defun doom:go-test-run-all ()
(interactive)
(async-shell-command (format "cd '%s' && go test" (narf/project-root))))
(async-shell-command (format "cd '%s' && go test" (doom/project-root))))
;;;###autoload
(defun narf:go-test-run-package ()
(defun doom:go-test-run-package ()
(interactive)
(error "Not yet implemented")
(async-shell-command (format "cd '%s' && go test %s" (narf/project-root) (narf--go-get-package))))
(async-shell-command (format "cd '%s' && go test %s" (doom/project-root) (doom--go-get-package))))
(provide 'defuns-go)
;;; defuns-go.el ends here

View file

@ -1,18 +1,18 @@
;;; defuns-java.el ---
;;; defuns-java.el
;; yasnippet defuns
;;;###autoload
(defun narf/java-android-mode-is-layout-file ()
(defun doom/java-android-mode-is-layout-file ()
(and android-mode
(eq major-mode 'nxml-mode)
(string-equal (file-name-base (directory-file-name default-directory)) "layout")))
;;;###autoload
(defun narf/java-android-mode-in-tags (&rest tags)
(defun doom/java-android-mode-in-tags (&rest tags)
(-contains? tags (android-mode-tag-name)))
;;;###autoload
(defun narf/java-android-mode-tag-name ()
(defun doom/java-android-mode-tag-name ()
(save-excursion
(let (beg end)
(nxml-backward-up-element)
@ -23,13 +23,13 @@
(buffer-substring-no-properties beg end))))
;;;###autoload
(defun narf|android-mode-enable-maybe ()
(let ((root (narf/project-root)))
(when (or (narf/project-has-files "local.properties" root)
(narf/project-has-files "AndroidManifest.xml" root)
(narf/project-has-files "src/main/AndroidManifest.xml" root))
(defun doom|android-mode-enable-maybe ()
(let ((root (doom/project-root)))
(when (or (doom/project-has-files "local.properties" root)
(doom/project-has-files "AndroidManifest.xml" root)
(doom/project-has-files "src/main/AndroidManifest.xml" root))
(android-mode +1)
(narf/set-build-command "./gradlew %s" "build.gradle"))))
(doom/set-build-command "./gradlew %s" "build.gradle"))))
(provide 'defuns-java)
;;; defuns-java.el ends here

View file

@ -1,7 +1,7 @@
;;; defuns-julia.el
;;;###autoload
(defun narf/julia-repl ()
(defun doom/julia-repl ()
"Run an inferior instance of `julia' inside Emacs."
(interactive)
(let ((buffer (get-buffer-create "*Julia*")))

View file

@ -1,26 +1,26 @@
;;; defuns-lisp.el
;;;###autoload
(defun narf/elisp-find-function-at-pt ()
(defun doom/elisp-find-function-at-pt ()
(interactive)
(let ((func (function-called-at-point)))
(if func (find-function func))))
;;;###autoload
(defun narf/elisp-find-function-at-pt-other-window ()
(defun doom/elisp-find-function-at-pt-other-window ()
(interactive)
(let ((func (function-called-at-point)))
(if func (find-function-other-window func))))
(defun narf--ert-pre ()
(defun doom--ert-pre ()
(save-buffer)
(eval-buffer))
;;;###autoload
(defun narf/ert-run-test ()
(defun doom/ert-run-test ()
(interactive)
(let (case-fold-search)
(narf--ert-pre)
(doom--ert-pre)
(aif (thing-at-point 'defun t)
(if (string-match "(ert-deftest \\([^ ]+\\)" it)
(ert-run-tests-interactively (substring it (match-beginning 1) (match-end 1)))
@ -28,34 +28,34 @@
(user-error "No test found at point"))))
;;;###autoload
(defun narf/ert-rerun-test ()
(defun doom/ert-rerun-test ()
(interactive)
(let (case-fold-search)
(narf--ert-pre)
(doom--ert-pre)
(aif (car-safe ert--selector-history)
(ert-run-tests-interactively it)
(message "No test found in history, looking for test at point")
(narf/ert-run-test))))
(doom/ert-run-test))))
;;;###autoload
(defun narf/ert-run-all-tests ()
(defun doom/ert-run-all-tests ()
(interactive)
(ert-delete-all-tests)
(narf--ert-pre)
(doom--ert-pre)
(ert-run-tests-interactively t))
;;;###autoload
(defun narf/elisp-auto-compile ()
(defun doom/elisp-auto-compile ()
(when (let ((file-name (buffer-file-name)))
(and (f-exists? (f-expand (concat (f-base file-name) ".elc") (f-dirname file-name)))
(--any? (f-child-of? file-name it)
(append (list narf-core-dir narf-modules-dir
narf-core-dir narf-modules-dir
narf-private-dir)))))
(narf:compile-el)))
(append (list doom-core-dir doom-modules-dir
doom-core-dir doom-modules-dir
doom-private-dir)))))
(doom:compile-el)))
;;;###autoload
(defun narf/elisp-inf-ielm ()
(defun doom/elisp-inf-ielm ()
(ielm)
(let ((buf (current-buffer)))
(bury-buffer)

View file

@ -1,7 +1,7 @@
;;; defuns-lua.el
;;;###autoload
(defun narf/inf-lua ()
(defun doom/inf-lua ()
(interactive)
(lua-start-process "lua" "lua")
(pop-to-buffer lua-process-buffer))

View file

@ -1,11 +1,11 @@
;;; defuns-markdown.el --- for module-markdown.el
;;; defuns-markdown.el
;; Implement strike-through formatting
(defvar narf--markdown-regex-del
(defvar doom--markdown-regex-del
"\\(^\\|[^\\]\\)\\(\\(~\\{2\\}\\)\\([^ \n \\]\\|[^ \n ]\\(?:.\\|\n[^\n]\\)*?[^\\ ]\\)\\(\\3\\)\\)")
;;;###autoload
(defun narf/markdown-insert-del ()
(defun doom/markdown-insert-del ()
"Surround region in github strike-through delimiters."
(interactive)
(let ((delim "~~"))
@ -13,13 +13,12 @@
;; Active region
(let ((bounds (markdown-unwrap-things-in-region
(region-beginning) (region-end)
narf--markdown-regex-del 2 4)))
doom--markdown-regex-del 2 4)))
(markdown-wrap-or-insert delim delim nil (car bounds) (cdr bounds)))
;; Bold markup removal, bold word at point, or empty markup insertion
(if (thing-at-point-looking-at narf--markdown-regex-del)
(if (thing-at-point-looking-at doom--markdown-regex-del)
(markdown-unwrap-thing-at-point nil 2 4)
(markdown-wrap-or-insert delim delim 'word nil nil)))))
(provide 'defuns-markdown)
;;; defuns-markdown.el ends here

View file

@ -1,41 +1,41 @@
;;; defuns-org-notebook.el
;;;###autoload
(defun narf/org ()
(defun doom/org ()
(interactive)
(find-file (f-expand "inbox.org" org-directory)))
;;;###autoload
(defun narf/org-notebook-new ()
(defun doom/org-notebook-new ()
(interactive)
(projectile-invalidate-cache nil)
(let* ((default-directory org-directory)
(dir (projectile-complete-dir))
(narf-org-quicknote-dir dir))
(doom-org-quicknote-dir dir))
(when dir
(narf/org-notebook-quick-note))))
(doom/org-notebook-quick-note))))
;;;###autoload
(defun narf/org-notebook-quick-note ()
(defun doom/org-notebook-quick-note ()
(interactive)
(let (text)
(when (evil-visual-state-p)
(setq text (buffer-substring-no-properties evil-visual-beginning evil-visual-end)))
(switch-to-buffer (generate-new-buffer "*quick-note*"))
(setq default-directory narf-org-quicknote-dir)
(setq default-directory doom-org-quicknote-dir)
(erase-buffer)
(insert text)))
;;;###autoload
(defun narf/org-download-dnd (uri action)
(defun doom/org-download-dnd (uri action)
(if (eq major-mode 'org-mode)
(narf:org-attach uri)
(doom:org-attach uri)
(let ((dnd-protocol-alist
(rassq-delete-all 'narf/org-download-dnd (copy-alist dnd-protocol-alist))))
(rassq-delete-all 'doom/org-download-dnd (copy-alist dnd-protocol-alist))))
(dnd-handle-one-url nil action uri))))
;;;###autoload (autoload 'narf:org-attach "defuns-org-notebook" nil t)
(evil-define-command narf:org-attach (&optional uri)
;;;###autoload (autoload 'doom:org-attach "defuns-org-notebook" nil t)
(evil-define-command doom:org-attach (&optional uri)
(interactive "<a>")
(unless (eq major-mode 'org-mode)
(user-error "Not in an org-mode buffer"))
@ -51,22 +51,22 @@
(if (evil-visual-state-p)
(org-insert-link nil (format "./%s" rel-path)
(concat (buffer-substring-no-properties (region-beginning) (region-end))
" " (narf/org-attach-icon rel-path)))
" " (doom/org-attach-icon rel-path)))
(insert (if image-p
(format "[[./%s]]" rel-path)
(format "%s [[./%s][%s]]"
(narf/org-attach-icon rel-path)
(doom/org-attach-icon rel-path)
rel-path (f-filename rel-path)))))
(when (string-match-p (regexp-opt '("jpg" "jpeg" "gif" "png")) (f-ext rel-path))
(org-toggle-inline-images)))
(let ((attachments (narf-org-attachments)))
(let ((attachments (doom-org-attachments)))
(unless attachments
(user-error "No attachments in this file"))
(helm :sources (helm-build-sync-source "Attachments" :candidates attachments)))))
;;;###autoload
(defun narf/org-attach-icon (path)
(defun doom/org-attach-icon (path)
(char-to-string (pcase (downcase (f-ext path))
("jpg" ?) ("jpeg" ?) ("png" ?) ("gif" ?)
("pdf" ?)
@ -79,7 +79,7 @@
(t ?))))
;;;###autoload
(defun narf/org-attachments ()
(defun doom/org-attachments ()
"Retrieves a list of all the attachments pertinent to the currect org-mode buffer."
(org-save-outline-visibility nil
(let ((attachments '())
@ -100,15 +100,15 @@
(-distinct attachments))))
;;;###autoload
(defun narf/org-cleanup-attachments ()
(defun doom/org-cleanup-attachments ()
"Deletes any attachments that are no longer present in the org-mode buffer."
(let* ((attachments (narf/org-attachments))
(to-delete (-difference narf-org-attachments-list attachments)))
(let* ((attachments (doom/org-attachments))
(to-delete (-difference doom-org-attachments-list attachments)))
(mapc (lambda (f)
(message "Deleting attachment: %s" f)
(delete-file f t))
to-delete)
(setq narf-org-attachments-list attachments)))
(setq doom-org-attachments-list attachments)))
;;
@ -117,10 +117,10 @@
;; Ex-mode interface for `helm-ag'. If `bang', then `search' is interpreted as
;; regexp.
;;;###autoload (autoload 'narf:org-helm-search "defuns-org-notebook" nil t)
(evil-define-operator narf:org-helm-search (beg end &optional search bang)
;;;###autoload (autoload 'doom:org-helm-search "defuns-org-notebook" nil t)
(evil-define-operator doom:org-helm-search (beg end &optional search bang)
(interactive "<r><a><!>")
(narf:helm-ag-search beg end (if bang (concat "^\\*+.*" search ".*$") search) t org-directory))
(doom:helm-ag-search beg end (if bang (concat "^\\*+.*" search ".*$") search) t org-directory))
(provide 'defuns-org-notebook)
;;; defuns-org-notebook.el ends here

View file

@ -1,25 +1,25 @@
;;; defuns-org.el
;;;###autoload
(defun narf/org-find-file-in-notes ()
(defun doom/org-find-file-in-notes ()
(interactive)
(in! (f-slash org-directory)
(helm-projectile-find-file)))
;;;###autoload
(defun narf/org-find-file ()
(defun doom/org-find-file ()
(interactive)
(in! (f-slash org-directory)
(helm-find-files nil)))
;;;###autoload
(defun narf/org-find-exported-file ()
(defun doom/org-find-exported-file ()
(interactive)
(in! (f-slash narf-org-export-directory)
(in! (f-slash doom-org-export-directory)
(helm-find-files nil)))
;;;###autoload
(defun narf/org-get-property (name)
(defun doom/org-get-property (name)
(interactive)
(save-excursion
(goto-char 1)
@ -27,7 +27,7 @@
(buffer-substring-no-properties (match-beginning 1) (match-end 1))))
;;;###autoload
(defun narf/org-indent ()
(defun doom/org-indent ()
(interactive)
(cond
((and (org-on-heading-p)
@ -37,7 +37,7 @@
(t (call-interactively 'self-insert-command))))
;;;###autoload
(defun narf/org-dedent ()
(defun doom/org-dedent ()
(interactive)
(cond
((and (org-on-heading-p)
@ -47,7 +47,7 @@
(t (call-interactively 'self-insert-command))))
;;;###autoload
(defun narf/org-insert-item (direction)
(defun doom/org-insert-item (direction)
"Inserts a new heading or item, depending on the context. I use this instead of
`org-insert-item' or `org-insert-heading' because they try to do too much and end up doing
this otherwise simple task wrong (e.g. whitespace in the wrong places)."
@ -74,7 +74,7 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
('below
(org-table-insert-row))
('above
(narf/org-table-prepend-row-or-shift-up))))
(doom/org-table-prepend-row-or-shift-up))))
(t
(let ((level (save-excursion
(org-back-to-heading)
@ -104,7 +104,7 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
(evil-append-line 1)))
;;;###autoload
(defun narf/org-toggle-checkbox ()
(defun doom/org-toggle-checkbox ()
(interactive)
(let ((context (org-element-lineage (org-element-context) '(item) t)))
(when context
@ -116,7 +116,7 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
(insert "[ ] ")))))
;;;###autoload
(defun narf/org-dwim-at-point ()
(defun doom/org-dwim-at-point ()
(interactive)
(let* ((scroll-pt (window-start))
(context (org-element-context))
@ -160,14 +160,14 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
((memq type '(link))
(let ((path (org-element-property :path (org-element-lineage (org-element-context) '(link) t))))
(if (and path (image-type-from-file-name path))
(narf/org-refresh-inline-images)
(doom/org-refresh-inline-images)
(org-open-at-point))))
(t (narf/org-refresh-inline-images)))
(t (doom/org-refresh-inline-images)))
(set-window-start nil scroll-pt)))
;;;###autoload
(defun narf/org-refresh-inline-images ()
(defun doom/org-refresh-inline-images ()
(interactive)
(if (> (length org-inline-image-overlays) 0)
(org-remove-inline-images)
@ -182,7 +182,7 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
;; Formatting shortcuts
;;;###autoload
(defun narf/org-surround (delim)
(defun doom/org-surround (delim)
(if (region-active-p)
(save-excursion
(goto-char (region-beginning))
@ -193,7 +193,7 @@ this otherwise simple task wrong (e.g. whitespace in the wrong places)."
(save-excursion (insert delim))))
;;;###autoload
(defun narf/org-word-count (beg end &optional count-footnotes?)
(defun doom/org-word-count (beg end &optional count-footnotes?)
"Report the number of words in the Org mode buffer or selected region.
Ignores:
- comments
@ -265,7 +265,7 @@ COUNT-FOOTNOTES? is non-nil."
(if mark-active "region" "buffer")))))
;;;###autoload
(defun narf/org-remove-link ()
(defun doom/org-remove-link ()
"Replace an org link by its description or if empty its address"
(interactive)
(if (org-in-regexp org-bracket-link-regexp 1)
@ -277,52 +277,52 @@ COUNT-FOOTNOTES? is non-nil."
(insert description))))
;;;###autoload
(defun narf/org-table-next-row ()
(defun doom/org-table-next-row ()
(interactive)
(if (org-at-table-p) (org-table-next-row) (org-down-element)))
;;;###autoload
(defun narf/org-table-previous-row ()
(defun doom/org-table-previous-row ()
(interactive)
(if (org-at-table-p) (narf--org-table-previous-row) (org-up-element)))
(if (org-at-table-p) (doom--org-table-previous-row) (org-up-element)))
;;;###autoload
(defun narf/org-table-next-field ()
(defun doom/org-table-next-field ()
(interactive)
(if (org-at-table-p) (org-table-next-field) (org-end-of-line)))
;;;###autoload
(defun narf/org-table-previous-field ()
(defun doom/org-table-previous-field ()
(interactive)
(if (org-at-table-p) (org-table-previous-field) (org-beginning-of-line)))
;;;###autoload
(defun narf/org-table-append-field-or-shift-right ()
(defun doom/org-table-append-field-or-shift-right ()
(interactive)
(org-shiftmetaright)
(when (org-at-table-p) (org-metaright)))
;;;###autoload
(defun narf/org-table-prepend-field-or-shift-left ()
(defun doom/org-table-prepend-field-or-shift-left ()
(interactive)
(if (org-at-table-p)
(org-shiftmetaright)
(org-shiftmetaleft)))
;;;###autoload
(defun narf/org-table-append-row-or-shift-down ()
(defun doom/org-table-append-row-or-shift-down ()
(interactive)
(org-shiftmetadown)
(when (org-at-table-p) (org-metadown)))
;;;###autoload
(defun narf/org-table-prepend-row-or-shift-up ()
(defun doom/org-table-prepend-row-or-shift-up ()
(interactive)
(if (org-at-table-p)
(org-shiftmetadown)
(org-shiftmetaup)))
(defun narf--org-table-previous-row ()
(defun doom--org-table-previous-row ()
"Go to the previous row (same column) in the current table. Before doing so,
re-align the table if necessary. (Necessary because org-mode has a
`org-table-next-row', but not `org-table-previous-row')"
@ -340,8 +340,8 @@ re-align the table if necessary. (Necessary because org-mode has a
(skip-chars-backward "^|\n\r")
(when (org-looking-at-p " ") (forward-char))))
;;;###autoload (autoload 'narf:org-link "defuns-org" nil t)
(evil-define-command narf:org-link (link)
;;;###autoload (autoload 'doom:org-link "defuns-org" nil t)
(evil-define-command doom:org-link (link)
"Add LINK to the org buffer. If a selection is active, link selection to LINK."
(interactive "<a>")
(unless (eq major-mode 'org-mode)
@ -351,7 +351,7 @@ re-align the table if necessary. (Necessary because org-mode has a
(org-insert-link nil link (when (and beg end) (buffer-substring-no-properties beg end)))))
;;;###autoload
(defun narf/sp-org-skip-asterisk (ms mb me)
(defun doom/sp-org-skip-asterisk (ms mb me)
(or (and (= (line-beginning-position) mb)
(eq 32 (char-after (1+ mb))))
(and (= (1+ (line-beginning-position)) me)

View file

@ -1,14 +1,14 @@
;;; defuns-python.el
;;;###autoload
(defun narf*anaconda-mode-doc-buffer ()
(defun doom*anaconda-mode-doc-buffer ()
"Delete the window on escape or C-g."
(with-current-buffer (get-buffer "*anaconda-doc*")
(local-set-key [escape] 'anaconda-nav-quit)
(local-set-key [?\C-g] 'anaconda-nav-quit)))
;;;###autoload
(defun narf/inf-python ()
(defun doom/inf-python ()
(run-python python-shell-interpreter t t))
(provide 'defuns-python)

View file

@ -1,13 +1,13 @@
;;; defuns-regex.el
;;;###autoload
(defun narf|reb-cleanup ()
(defun doom|reb-cleanup ()
(replace-regexp "^[ \n]*" "" nil (point-min) (point-max))
(text-scale-set 2)
(goto-char 2))
;;;###autoload (autoload 'narf:regex "defuns-regex" nil t)
(evil-define-operator narf:regex (beg end type &optional regexstr bang)
;;;###autoload (autoload 'doom:regex "defuns-regex" nil t)
(evil-define-operator doom:regex (beg end type &optional regexstr bang)
"Either a) converts selected (or entered-in) pcre regex into elisp
regex, OR b) opens up re-builder."
:move-point nil

View file

@ -1,7 +1,7 @@
;;; defuns-sh.el
(defvar sh-extra-font-lock--keywords
`((narf/sh-extra-font-lock--match-var-in-double-quoted-string
`((doom/sh-extra-font-lock--match-var-in-double-quoted-string
(2 font-lock-variable-name-face prepend))
(,(concat
"\\<"
@ -10,13 +10,13 @@
(0 'font-lock-builtin-face))))
;;;###autoload
(defun narf/sh-extra-font-lock--is-in-double-quoted-string ()
(defun doom/sh-extra-font-lock--is-in-double-quoted-string ()
"Non-nil if point in inside a double-quoted string."
(let ((state (syntax-ppss)))
(eq (nth 3 state) ?\")))
;;;###autoload
(defun narf/sh-extra-font-lock--match-var-in-double-quoted-string (limit)
(defun doom/sh-extra-font-lock--match-var-in-double-quoted-string (limit)
"Search for variables in double-quoted strings bounded by LIMIT."
(let (res)
(while
@ -24,11 +24,11 @@
(re-search-forward
"\\$\\({#?\\)?\\([[:alpha:]_][[:alnum:]_]*\\|[-#?@!]\\)"
limit t))
(not (narf/sh-extra-font-lock--is-in-double-quoted-string))))
(not (doom/sh-extra-font-lock--is-in-double-quoted-string))))
res))
;;;###autoload
(defun narf|sh-extra-font-lock-activate ()
(defun doom|sh-extra-font-lock-activate ()
"Activate sh-extra-font-lock."
(interactive)
(font-lock-add-keywords nil sh-extra-font-lock--keywords)
@ -39,7 +39,7 @@
(font-lock-fontify-buffer)))))
;;;###autoload
(defun narf/inf-shell ()
(defun doom/inf-shell ()
(let* ((dest-sh (symbol-name sh-shell))
(sh-shell-file dest-sh))
(sh-shell-process t)

View file

@ -1,26 +1,26 @@
;;; defuns-web.el
;;;###autoload
(defun narf/web-html-email2mailto (beg end)
(defun doom/web-html-email2mailto (beg end)
(interactive "r")
(replace-regexp "\\b\\([a-zA-Z0-9._+-%]+@[a-zA-Z0-9-.]+\\.[a-zA-Z]+\\)\\b"
"<a href=\"mailto:\\1\">\\1</a>"
nil beg end))
;;;###autoload
(defun narf/web-html-url2anchor (beg end)
(defun doom/web-html-url2anchor (beg end)
(interactive "r")
(replace-regexp "\\bhttps?://.+?\\b"
"<a href=\"\\1\">\\1</a>"
nil beg end))
;;;###autoload
(defun narf/web-refresh-browser ()
(defun doom/web-refresh-browser ()
(interactive)
(call-process-shell-command "osascript -e 'tell application \"Google Chrome\" to tell the active tab of its first window to reload' &" nil 0))
;;;###autoload (autoload 'narf/html-entities "defuns-web" nil t)
(evil-define-operator narf/html-entities (bang beg end)
;;;###autoload (autoload 'doom/html-entities "defuns-web" nil t)
(evil-define-operator doom/html-entities (bang beg end)
"HTML encode/decode the selected region. Based on Xah's replace HTML named entities
function @ http://ergoemacs.org/emacs/elisp_replace_html_entities_command.html"
(interactive "<!><r>")

View file

@ -4,20 +4,20 @@
(defmacro define-org-section! (type directory &optional id-func link-glob)
(setq directory (f-slash directory))
(let* ((type-str (symbol-name type))
(link-sym (intern (format "narf/org-link-%s" type-str)))
(link-sym (intern (format "doom/org-link-%s" type-str)))
(dir-var (intern (format "org-directory-%s" type-str))))
`(progn
;; Variable containing directory: `org-directory-%s'
(defvar ,dir-var ,(expand-file-name directory org-directory))
;; Open helm in directory: `narf/helm-org-%s'
(evil-define-command ,(intern (format "narf:org-search-%s" type-str)) ()
;; Open helm in directory: `doom/helm-org-%s'
(evil-define-command ,(intern (format "doom:org-search-%s" type-str)) ()
(interactive)
(let ((default-directory (concat ,dir-var "/" (format-time-string "%Y") "/")))
(helm-find-files nil)))
;; Open helm in directory: `narf/helm-org-%s'
(defun ,(intern (format "narf/helm-org-find-file-in-%s" type-str)) ()
;; Open helm in directory: `doom/helm-org-%s'
(defun ,(intern (format "doom/helm-org-find-file-in-%s" type-str)) ()
(interactive)
(helm-do-ag (f-slash ,dir-var)))

View file

@ -23,7 +23,7 @@
:init-value nil
:lighter " BIG"
:global t
(narf/load-font (if big-mode big-mode-font narf-default-font))
(doom/load-font (if big-mode big-mode-font doom-default-font))
(setq-default powerline-height
(if big-mode
big-mode-modeline-height

View file

@ -2,7 +2,7 @@
;; WIP
(defvar narf-ctags-alist
(defvar doom-ctags-alist
'((ruby-mode :exec "ripper-tags -R -f %t --emacs")
(c++-mode :ext "cpp")
(c-mode :ext "c")
@ -11,26 +11,26 @@
))
(add-hook 'find-file-hook 'narf|init-tags)
(defun narf|init-tags ()
(awhen (narf/tags-p)
(add-hook 'find-file-hook 'doom|init-tags)
(defun doom|init-tags ()
(awhen (doom/tags-p)
(setq tags-table-list (list it))))
;; TODO
;; (defun narf/tags-generate ()
;; (defun doom/tags-generate ()
;; (interactive)
;; (let ((command (assoc major-mode narf-ctags-alist))
;; (default-directory (narf/project-root)))
;; (let ((command (assoc major-mode doom-ctags-alist))
;; (default-directory (doom/project-root)))
;; (unless command
;; (user-error "No tag generator for %s" major-mode))
;; (async-shell-command command "*narf:generate-tags*")))
;; (async-shell-command command "*doom:generate-tags*")))
;;;###autoload
(defun narf/find-def ()
(defun doom/find-def ()
(interactive)
(let ((orig-pt (point))
(orig-file (buffer-file-name)))
(cond ((and (narf/tags-p)
(cond ((and (doom/tags-p)
(progn (call-interactively 'helm-etags-select)
(and (/= orig-pt (point))
(f-same? orig-file buffer-file-name)))))
@ -40,8 +40,8 @@
(t (call-interactively 'evil-goto-definition)))))
;;;###autoload
(defun narf/tags-p ()
(let ((path (expand-file-name ".tags" (narf/project-root))))
(defun doom/tags-p ()
(let ((path (expand-file-name ".tags" (doom/project-root))))
(and (f-exists? path) path)))
(provide 'extra-tags)

View file

@ -24,37 +24,37 @@
:ex-arg shell
(list (when (evil-ex-p) (evil-ex-file-arg))))
;;;###autoload (autoload 'narf:tmux-cd "extra-tmux" nil t)
(evil-define-command narf:tmux-cd (&optional bang)
;;;###autoload (autoload 'doom:tmux-cd "extra-tmux" nil t)
(evil-define-command doom:tmux-cd (&optional bang)
(interactive "<!>")
(if bang
(narf/tmux-cd-to-project)
(narf/tmux-cd-to-here)))
(doom/tmux-cd-to-project)
(doom/tmux-cd-to-here)))
(defvar narf-tmux-last-command nil "The last command sent to tmux")
;;;###autoload (autoload 'narf:tmux "extra-tmux" nil t)
(evil-define-operator narf:tmux (&optional command bang)
(defvar doom-tmux-last-command nil "The last command sent to tmux")
;;;###autoload (autoload 'doom:tmux "extra-tmux" nil t)
(evil-define-operator doom:tmux (&optional command bang)
"Sends input to tmux. Use `bang' to append to tmux"
:type inclusive
(interactive "<term><!>")
(unless command
(setq command narf-tmux-last-command))
(setq command doom-tmux-last-command))
(if (not command)
(os-switch-to-term)
(tmux command (not bang))
(setq narf-tmux-last-command command)
(setq doom-tmux-last-command command)
(when (evil-ex-p)
(message "[Tmux] %s" command))))
;;;###autoload
(defun narf/tmux-cd-to-here (&optional dir)
(defun doom/tmux-cd-to-here (&optional dir)
(interactive)
(tmux (format "cd '%s'" (or dir default-directory))))
;;;###autoload
(defun narf/tmux-cd-to-project ()
(defun doom/tmux-cd-to-project ()
(interactive)
(narf/tmux-cd-to-here (narf/project-root)))
(doom/tmux-cd-to-here (doom/project-root)))
(provide 'extra-tmux)
;;; extra-tmux.el ends here

View file

@ -8,10 +8,11 @@
;; Write-mode settings
(defconst write-mode nil)
(defconst write-mode-theme 'narf-light)
(defconst write-mode-theme 'doom-light)
(defconst write-mode-font (font-spec :family "Hack" :size 12))
(defconst write-mode--last-mode-line mode-line-format)
(defconst write-mode--last-theme doom-current-theme)
(defconst write-mode--last-line-spacing line-spacing)
(spaceline-compile
@ -40,8 +41,8 @@ functionality with buffer-local ones, which can be buggy in a minor-mode."
(interactive)
(let* ((mode-p write-mode)
(on-off (if mode-p -1 +1)))
(narf/load-theme (if mode-p 'narf-dark write-mode-theme) t)
(narf/load-font (if mode-p narf-default-font write-mode-font))
(doom/load-theme (if mode-p write-mode--last-theme write-mode-theme) t)
(doom/load-font (if mode-p doom-default-font write-mode-font))
(if mode-p
(remove-hook 'org-mode-hook 'write-mode|org-hook)
(add-hook 'org-mode-hook 'write-mode|org-hook))
@ -54,7 +55,7 @@ functionality with buffer-local ones, which can be buggy in a minor-mode."
(unless mode-p
(setq mode-line-format write-mode--last-mode-line
header-line-format nil))))
(narf/get-buffers-in-modes '(org-mode markdown-mode)))
(doom/get-buffers-in-modes '(org-mode markdown-mode)))
(setq write-mode (not mode-p))))
(when (> emacs-major-version 24)

View file

@ -4,8 +4,8 @@
:commands (c-mode c++-mode objc-mode java-mode)
:mode ("\\.mm" . objc-mode)
:init
(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++-mode '(highlight-numbers-mode doom|init-c++-C11-highlights))
(add-hook 'c-initialization-hook 'doom|init-c/c++-settings)
;; C++ header files
(push (cons (lambda () (and (f-ext? buffer-file-name "h")
@ -30,22 +30,22 @@
(setq c-tab-always-indent nil
c-electric-flag nil)
(map! :map c-mode-base-map (:localleader :nv ";" 'narf/append-semicolon))
(map! :map c-mode-base-map (:localleader :nv ";" 'doom/append-semicolon))
(sp-with-modes '(c-mode c++-mode objc-mode java-mode)
(sp-local-pair "<" ">" :when '(narf/sp-point-is-template-p narf/sp-point-after-include-p))
(sp-local-pair "<" ">" :when '(doom/sp-point-is-template-p doom/sp-point-after-include-p))
(sp-local-pair "/*" "*/" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))
;; Doxygen blocks
(sp-local-pair "/**" "*/" :post-handlers '(("||\n[i]" "RET") ("||\n[i]" "SPC")))
(sp-local-pair "/*!" "*/" :post-handlers '(("||\n[i]" "RET") ("[d-1]< | " "SPC"))))
;; Improve indentation of inline lambdas in C++11
(advice-add 'c-lineup-arglist :around 'narf/c-lineup-arglist))
(advice-add 'c-lineup-arglist :around 'doom/c-lineup-arglist))
(use-package irony
:after cc-mode
:config
(setq irony-server-install-prefix (concat narf-temp-dir "/irony/"))
(setq irony-server-install-prefix (concat doom-temp-dir "/irony/"))
(add-hook! c++-mode
(make-variable-buffer-local 'irony-additional-clang-options)
(push "-std=c++11" irony-additional-clang-options))

View file

@ -10,7 +10,7 @@
:commands (omnisharp-mode)
:preface
(setq omnisharp-auto-complete-want-documentation nil
omnisharp-server-executable-path (concat narf-ext-dir "/OmniSharp.exe"))
omnisharp-server-executable-path (concat doom-ext-dir "/OmniSharp.exe"))
:when (file-exists-p omnisharp-server-executable-path)
:init (add-hook! csharp-mode '(turn-on-eldoc-mode omnisharp-mode))
:config

View file

@ -1,7 +1,7 @@
;;; module-css.el
(after! emr
(emr-declare-command 'narf/css-toggle-inline-or-block
(emr-declare-command 'doom/css-toggle-inline-or-block
:title "toggle inline/block"
:modes '(css-mode less-css-mode scss-mode)
:predicate (lambda () (not (use-region-p)))))
@ -35,7 +35,7 @@
(use-package sass-mode
:mode "\\.sass$"
:config
(def-builder! sass-mode narf/sass-build)
(def-builder! sass-mode doom/sass-build)
(def-company-backend! sass-mode (css yasnippet))
(def-docset! sass-mode "sass,bourbon")
(push '("sass" "css") projectile-other-file-alist))
@ -43,15 +43,15 @@
(use-package scss-mode
:mode "\\.scss$"
:config
(def-builder! scss-mode narf/scss-build)
(def-builder! scss-mode doom/scss-build)
(def-company-backend! scss-mode (css yasnippet))
(def-docset! scss-mode "sass,bourbon")
(push '("scss" "css") projectile-other-file-alist)
(setq scss-compile-at-save nil))
(map! :map (css-mode-map sass-mode-map scss-mode-map)
:n "M-R" 'narf/web-refresh-browser
(:localleader :nv ";" 'narf/append-semicolon)
:n "M-R" 'doom/web-refresh-browser
(:localleader :nv ";" 'doom/append-semicolon)
(:leader
:n ";" 'helm-css-scss
:n ":" 'helm-css-scss-multi))

View file

@ -5,7 +5,7 @@
:defer t
:init
(evil-set-initial-state 'eshell-mode 'normal)
(setq eshell-directory-name (concat narf-temp-dir "/eshell")
(setq eshell-directory-name (concat doom-temp-dir "/eshell")
eshell-scroll-to-bottom-on-input 'all
eshell-buffer-shorthand t
@ -14,7 +14,7 @@
eshell-error-if-no-glob t
;; em-alias
eshell-aliases-file (concat narf-temp-dir "/.eshell-aliases"))
eshell-aliases-file (concat doom-temp-dir "/.eshell-aliases"))
;; plan 9 smart shell
(require 'em-smart)
@ -24,15 +24,15 @@
(setq eshell-smart-space-goes-to-end t)
;; em-prompt
(setq eshell-prompt-function 'narf/eshell-prompt)
(setq eshell-prompt-function 'doom/eshell-prompt)
(map! :map eshell-mode-map
:n "i" 'narf/eshell-evil-prepend-maybe
:n "I" 'narf/eshell-evil-prepend
:n "a" 'narf/eshell-evil-append-maybe
:n "A" 'narf/eshell-evil-append
:n "r" 'narf/eshell-evil-replace-maybe
:n "R" 'narf/eshell-evil-replace-state-maybe))
:n "i" 'doom/eshell-evil-prepend-maybe
:n "I" 'doom/eshell-evil-prepend
:n "a" 'doom/eshell-evil-append-maybe
:n "A" 'doom/eshell-evil-append
:n "r" 'doom/eshell-evil-replace-maybe
:n "R" 'doom/eshell-evil-replace-state-maybe))
(provide 'module-eshell)
;;; module-eshell.el ends here

View file

@ -15,9 +15,9 @@
(:leader :n "h" 'godef-describe)
(:localleader
: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))
:n "tr" 'doom:go-test-run-all
:n "ta" 'doom:go-test-run-all
:n "ts" 'doom:go-test-run-package))
(mapc (lambda (x)
(let ((command-name (car x))

View file

@ -15,7 +15,7 @@
(use-package inf-haskell
:commands (inferior-haskell-mode inf-haskell-mode switch-to-haskell)
:config
(map! :map inf-haskell-mode-map "ESC ESC" 'narf/popup-close))
(map! :map inf-haskell-mode-map "ESC ESC" 'doom/popup-close))
(provide 'module-haskell)
;;; module-haskell.el ends here

View file

@ -1,6 +1,8 @@
;;; module-java.el --- the poster child for carpal tunnel
(def-docset! java-mode "java,droid,javafx,grails,groovy,playjava,spring,cvj,processing,javadoc")
(after! c-initialization
(def-docset! java-mode
"java,droid,javafx,grails,groovy,playjava,spring,cvj,processing,javadoc"))
(use-package eclim
:functions (eclim--project-dir eclim--project-name)
@ -29,7 +31,7 @@
(use-package android-mode
:commands android-mode
:init
(add-hook! (java-mode groovy-mode nxml-mode) 'narf|android-mode-enable-maybe)
(add-hook! (java-mode groovy-mode nxml-mode) 'doom|android-mode-enable-maybe)
:config
(def-yas-mode! 'android-mode)
(after! company-dict

View file

@ -22,7 +22,7 @@
;; [pedantry intensifies]
(add-hook! js2-mode (setq mode-name "JS2"))
(map! :map js2-mode-map (:localleader :nv ";" 'narf/append-semicolon)))
(map! :map js2-mode-map (:localleader :nv ";" 'doom/append-semicolon)))
(use-package tern
:after js2-mode
@ -95,14 +95,14 @@
(setq tide-format-options
'(:insertSpaceAfterFunctionKeywordForAnonymousFunctions t
:placeOpenBraceOnNewLineForFunctions nil))
(defun narf|tide-setup ()
(defun doom|tide-setup ()
(tide-setup)
(flycheck-mode +1)
(eldoc-mode +1))
(add-hook 'typescript-mode-hook 'narf|tide-setup)
(add-hook 'typescript-mode-hook 'doom|tide-setup)
(add-hook! web-mode
(when (f-ext? buffer-file-name "tsx")
(narf|tide-setup)))
(doom|tide-setup)))
(map! :map typescript-mode-map
:m "gd" 'tide-jump-to-definition
@ -115,7 +115,7 @@
:files ("package.json")
:when
(lambda (&rest _)
(let* ((project-path (narf/project-root))
(let* ((project-path (doom/project-root))
(hash (gethash project-path npm-conf))
(package-file (f-expand "package.json" project-path))
deps)
@ -128,7 +128,7 @@
:modes (nodejs-project-mode bower-project-mode)
:when
(lambda (&rest _)
(awhen (gethash (narf/project-root) npm-conf)
(awhen (gethash (doom/project-root) npm-conf)
(assq 'express (cdr-safe (assq 'dependencies it))))))
;; TODO electron-compile support
@ -137,7 +137,7 @@
:files ("app/index.html" "app/main.js")
:when
(lambda (&rest _)
(awhen (gethash (narf/project-root) npm-conf)
(awhen (gethash (doom/project-root) npm-conf)
(let ((deps (append (car-safe (assq 'dependencies it))
(car-safe (assq 'devDependencies it)))))
(or (assq 'electron-prebuilt deps)
@ -148,7 +148,7 @@
:modes (nodejs-project-mode bower-project-mode)
:when
(lambda (&rest _)
(let* ((project (narf/project-root))
(let* ((project (doom/project-root))
(deps (append (cdr-safe (assq 'dependencies (gethash project bower-conf)))
(cdr-safe (assq 'dependencies (gethash project npm-conf))))))
(assq 'react deps))))

View file

@ -3,7 +3,7 @@
(use-package julia-mode
:mode "\\.jl$"
:interpreter "julia"
:config (def-repl! julia-mode narf/julia-repl))
:config (def-repl! julia-mode doom/julia-repl))
(provide 'module-julia)
;;; module-julia.el ends here

View file

@ -1,6 +1,6 @@
;;; module-latex.el
(defvar bibtex-dir "~/Dropbox/docs/biblio")
(defvar doom-bibtex-dir "~/Dropbox/docs/biblio")
(use-package reftex
:commands turn-on-reftex
@ -8,7 +8,7 @@
(setq reftex-plug-into-AUCTeX t
reftex-ref-style-default-list '("Cleveref" "Hyperref" "Fancyref")
reftex-default-bibliography
`(,(expand-file-name "phys.bib" bibtex-dir)))
`(,(expand-file-name "phys.bib" doom-bibtex-dir)))
(add-hook! (LaTeX-mode latex-mode) 'turn-on-reftex))
(use-package helm-bibtex
@ -26,12 +26,12 @@
:config
(setq helm-bibtex-bibliography
(list (f-expand "phys.bib" bibtex-dir))
(list (f-expand "phys.bib" doom-bibtex-dir))
helm-bibtex-library-path
(list (f-expand "phys-pdf" bibtex-dir))
(list (f-expand "phys-pdf" doom-bibtex-dir))
helm-bibtex-notes-path (f-expand "notes.org" bibtex-dir)
helm-bibtex-notes-path (f-expand "notes.org" doom-bibtex-dir)
helm-bibtex-pdf-open-function
(lambda (fpath) (async-start-process "open-pdf" "/usr/bin/open" nil fpath))))

View file

@ -4,12 +4,12 @@
(add-hook! emacs-lisp-mode '(turn-on-eldoc-mode flycheck-mode highlight-numbers-mode))
;; Real go-to-definition for elisp
(map! :map emacs-lisp-mode-map :m "gd" 'narf/elisp-find-function-at-pt)
(map! :map emacs-lisp-mode-map :m "gd" 'doom/elisp-find-function-at-pt)
(add-hook 'emacs-lisp-mode-hook 'narf/elisp-init)
(defun narf/elisp-init ()
(add-hook 'emacs-lisp-mode-hook 'doom/elisp-init)
(defun doom/elisp-init ()
(def-company-backend! emacs-lisp-mode (elisp yasnippet))
(def-repl! emacs-lisp-mode narf/elisp-inf-ielm)
(def-repl! emacs-lisp-mode doom/elisp-inf-ielm)
(def-rotate! emacs-lisp-mode
:symbols (("t" "nil")
("let" "let*")
@ -23,16 +23,16 @@
(delq (assq 'emacs-lisp-mode editorconfig-indentation-alist)
editorconfig-indentation-alist))
(remove-hook 'emacs-lisp-mode-hook 'narf/elisp-init))
(remove-hook 'emacs-lisp-mode-hook 'doom/elisp-init))
(add-hook 'emacs-lisp-mode-hook 'narf/elisp-hook)
(defun narf/elisp-hook ()
(add-hook 'emacs-lisp-mode-hook 'doom/elisp-hook)
(defun doom/elisp-hook ()
(setq mode-name "Elisp") ; [pedantry intensifies]
(font-lock-add-keywords
nil `(("(\\(lambda\\)" (1 (narf/show-as )))
("(\\(narf\\)\\>" (1 font-lock-keyword-face append))
;; Highlight narf macros (macros are fontified in emacs 25+)
nil `(("(\\(lambda\\)" (1 (doom/show-as )))
("(\\(doom\\)\\(-[^) ]+\\)?)" (0 font-lock-keyword-face append))
;; Highlight doom macros (macros are fontified in emacs 25+)
(,(concat
"(\\(def-"
(regexp-opt '("electric" "project-type" "company-backend"
@ -43,7 +43,7 @@
(1 font-lock-keyword-face append))
(,(concat
"(\\("
(regexp-opt '("λ" "in" "map" "after" "shut-up" "add-hook"
(regexp-opt '("λ" "in" "map" "after" "shut-up" "add-hook"
"associate" "define-org-link" "ex"
"define-org-section"))
"!\\)")
@ -58,7 +58,7 @@
(2 font-lock-function-name-face))))
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
(add-hook 'after-save-hook 'narf/elisp-auto-compile nil t)
(add-hook 'after-save-hook 'doom/elisp-auto-compile nil t)
(dolist (i '(("Evil Command" "\\(^\\s-*(evil-define-command +\\)\\(\\_<.+\\_>\\)" 2)
("Evil Operator" "\\(^\\s-*(evil-define-operator +\\)\\(\\_<.+\\_>\\)" 2)
@ -107,10 +107,10 @@
:modes (emacs-lisp-mode)
:match "/test/.+-test\\.el$"
:bind (:localleader
:n "tr" 'narf/ert-rerun-test
:n "ta" 'narf/ert-run-all-tests
:n "ts" 'narf/ert-run-test)
(add-hook 'ert-results-mode-hook 'narf|hide-mode-line))
:n "tr" 'doom/ert-rerun-test
:n "ta" 'doom/ert-run-all-tests
:n "ts" 'doom/ert-run-test)
(add-hook 'ert-results-mode-hook 'doom|hide-mode-line))
(provide 'module-lisp)
;;; module-elisp.el ends here

View file

@ -7,7 +7,7 @@
:config
(def-company-backend! lua-mode (lua yasnippet))
(def-electric! lua-mode :words ("else" "end"))
(def-repl! lua-mode narf/inf-lua)
(def-repl! lua-mode doom/inf-lua)
(sp-with-modes '(lua-mode)
;; disable defaults
(sp-local-pair "if" nil :actions :rem)

View file

@ -1,21 +1,26 @@
;;; module-org-crm.el
(defun narf|org-crm-init ()
(define-org-section! cproject "Work")
(define-org-section! project "Projects")
(define-org-section! contact "Contacts")
(add-hook 'org-load-hook 'doom|org-crm-init)
(defvar org-directory-crm (expand-file-name "/crm/" org-directory))
(defun doom|org-crm-init ()
;; (define-org-section! work "Work")
;; (define-org-section! project "Projects")
;; (define-org-section! contact "Contacts")
)
(defun narf/org-crm-new (type name)
;;
(defun doom/org-crm-new (type name)
)
(defun narf/org-crm-visit-project (&optional name)
(defun doom/org-crm-visit-project (&optional name)
)
(defun narf/org-crm-visit-contact (&optional name)
(defun doom/org-crm-visit-contact (&optional name)
)
(defun narf/org-crm-visit-invoice (&optional name)
(defun doom/org-crm-visit-invoice (&optional name)
)
(provide 'module-org-crm)

View file

@ -9,19 +9,19 @@
;; for images and documents into org files
;; + A pandoc-powered export system
(add-hook 'org-load-hook 'narf|org-notebook-init t)
(add-hook 'org-load-hook 'narf|org-attach-init t)
(add-hook 'org-load-hook 'narf|org-export-init t)
(add-hook 'org-load-hook 'doom|org-notebook-init t)
(add-hook 'org-load-hook 'doom|org-attach-init t)
(add-hook 'org-load-hook 'doom|org-export-init t)
(defvar org-directory-notebook (expand-file-name "/notebook/" org-directory))
(defvar org-default-notes-file (expand-file-name "inbox.org" org-directory))
(defvar org-attach-directory ".attach/")
(defvar narf-org-export-directory (concat org-directory ".export"))
(defvar narf-org-quicknote-dir (concat org-directory "Inbox/"))
(defvar doom-org-export-directory (concat org-directory ".export"))
(defvar doom-org-quicknote-dir (concat org-directory "Inbox/"))
;; Keep track of attachments
(defvar-local narf-org-attachments-list '()
(defvar-local doom-org-attachments-list '()
"A list of attachments for the current buffer")
;; Tell helm to ignore these directories
@ -31,14 +31,14 @@
;;
(defun narf|org-notebook-init ()
(defun doom|org-notebook-init ()
;; (define-org-section! course "Classes"
;; (lambda (path) (substring path 0 (s-index-of " " path))) "%s*.org")
;; (exmap "ocl[ass]" 'narf:org-search-course)
(narf-fix-unicode "FontAwesome" '(? ? ? ? ? ? ? ? ?) 13))
;; (exmap "ocl[ass]" 'doom:org-search-course)
(doom-fix-unicode "FontAwesome" '(? ? ? ? ? ? ? ?) 13))
;;
(defun narf|org-attach-init ()
(defun doom|org-attach-init ()
;; Drag-and-drop support
(require 'org-download)
(setq-default org-download-image-dir org-attach-directory
@ -50,23 +50,23 @@
;; Write download paths relative to current file
(defun org-download--dir-2 () nil)
(defun narf*org-download--fullname (path)
(defun doom*org-download--fullname (path)
(f-relative path (f-dirname (buffer-file-name))))
(advice-add 'org-download--fullname :filter-return 'narf*org-download--fullname)
(advice-add 'org-download--fullname :filter-return 'doom*org-download--fullname)
;; Add another drag-and-drop handler that will handle anything but image files
(setq dnd-protocol-alist `(("^\\(https?\\|ftp\\|file\\|nfs\\):\\(//\\)?" . narf/org-download-dnd)
(setq dnd-protocol-alist `(("^\\(https?\\|ftp\\|file\\|nfs\\):\\(//\\)?" . doom/org-download-dnd)
,@dnd-protocol-alist))
;; ...auto-delete attachments once all references to it have been deleted.
(add-hook 'org-mode-hook 'narf|org-attach-track-init)
(defun narf|org-attach-track-init ()
(setq narf-org-attachments-list (narf/org-attachments))
(add-hook 'after-save-hook 'narf/org-cleanup-attachments nil t)))
(add-hook 'org-mode-hook 'doom|org-attach-track-init)
(defun doom|org-attach-track-init ()
(setq doom-org-attachments-list (doom/org-attachments))
(add-hook 'after-save-hook 'doom/org-cleanup-attachments nil t)))
;;
(defun narf|org-export-init ()
(defun doom|org-export-init ()
"Set up my own exporting system."
(setq org-export-backends '(ascii html latex md)
org-export-with-toc t
@ -76,21 +76,21 @@
(setq org-pandoc-options '((standalone . t) (mathjax . t) (parse-raw . t)))
;; Export to a central directory (why isn't this easier?)
(unless (file-directory-p narf-org-export-directory)
(mkdir narf-org-export-directory))
(defun narf*org-export-output-file-name (args)
(unless (file-directory-p doom-org-export-directory)
(mkdir doom-org-export-directory))
(defun doom*org-export-output-file-name (args)
(unless (nth 2 args)
(setq args (append args (list narf-org-export-directory))))
(setq args (append args (list doom-org-export-directory))))
args)
(advice-add 'org-export-output-file-name :filter-args 'narf*org-export-output-file-name))
(advice-add 'org-export-output-file-name :filter-args 'doom*org-export-output-file-name))
;;
;; (defvar narf-org-tags '())
;; (defun narf|org-tag-init ()
;; (defvar doom-org-tags '())
;; (defun doom|org-tag-init ()
;; (async-start
;; `(lambda ()
;; (let ((default-directory (narf/project-root))
;; (let ((default-directory (doom/project-root))
;; (data (s-trim (shell-command-to-string "ag --nocolor --nonumbers '^#\\+TAGS:'")))
;; (alist '()))
;; (unless (zerop (length data))

View file

@ -1,8 +1,8 @@
;;; module-org.el
(add-hook 'org-load-hook 'narf|org-init t)
(add-hook 'org-load-hook 'narf|org-keybinds t)
(add-hook 'org-mode-hook 'narf|org-hook)
(add-hook 'org-load-hook 'doom|org-init t)
(add-hook 'org-load-hook 'doom|org-keybinds t)
(add-hook 'org-mode-hook 'doom|org-hook)
(defvar org-directory (expand-file-name "~/Dropbox/notes/"))
@ -17,7 +17,7 @@
(require 'module-org-notebook)
;;
(defun narf|org-hook ()
(defun doom|org-hook ()
(evil-org-mode +1)
(visual-line-mode +1)
(setq line-spacing 2)
@ -29,14 +29,14 @@
(outline-previous-visible-heading 1)
(org-show-subtree))))
(defun narf|org-update ()
(defun doom|org-update ()
(when (file-exists-p buffer-file-name)
(org-update-statistics-cookies t)))
(add-hook 'before-save-hook 'narf|org-update nil t)
(add-hook 'evil-insert-state-exit-hook 'narf|org-update nil t))
(add-hook 'before-save-hook 'doom|org-update nil t)
(add-hook 'evil-insert-state-exit-hook 'doom|org-update nil t))
(defun narf|org-init ()
(defun doom|org-init ()
(setq-default
org-export-coding-system 'utf-8
@ -109,7 +109,7 @@
org-highlight-latex-and-related '(latex)
org-latex-create-formula-image-program 'dvipng
org-latex-image-default-width ".9\\linewidth"
org-latex-preview-ltxpng-directory (concat narf-temp-dir "/ltxpng/")
org-latex-preview-ltxpng-directory (concat doom-temp-dir "/ltxpng/")
org-latex-remove-logfiles nil
org-startup-with-latex-preview nil
;; org-latex-packages-alist
@ -122,7 +122,7 @@
;; TODO: New vocabulary word
("c" "Changelog" entry
(file+headline (f-expand "CHANGELOG.org" (narf/project-root)) "Unreleased")
(file+headline (f-expand "CHANGELOG.org" (doom/project-root)) "Unreleased")
"* %?")
;; ("p" "Project Notes" entry
@ -142,8 +142,8 @@
;; "** %i%?\n")
))
(narf-fix-unicode "DejaVu Sans" '(?♭ ?♯))
(narf-fix-unicode "Hack" '(?× ?∙ ?⌉ ?⌈ ?⌊ ?⌋
(doom-fix-unicode "DejaVu Sans" '(?♭ ?♯))
(doom-fix-unicode "Hack" '(?× ?∙ ?⌉ ?⌈ ?⌊ ?⌋
?∩ ? ?⊆ ?⊂ ?⊄ ?⊇ ?⊃ ?⊅
?⇒ ?⇐ ?⇔ ?↔ ?→ ?≡ ?∴ ?∵ ?⊕ ?∀ ?∃ ?∄ ?∈ ?∉
? ?∧ ))
@ -196,13 +196,13 @@
(pushnew 'org-is-agenda-file recentf-exclude)
;; Remove highlights on ESC
(defun narf*org-remove-occur-highlights (&rest args)
(defun doom*org-remove-occur-highlights (&rest args)
(when (eq major-mode 'org-mode) (org-remove-occur-highlights)))
(advice-add 'evil-force-normal-state :before 'narf*org-remove-occur-highlights)
(advice-add 'evil-force-normal-state :before 'doom*org-remove-occur-highlights)
;; smartparens config
(sp-with-modes '(org-mode)
(sp-local-pair "*" "*" :unless '(sp-point-after-word-p sp-point-at-bol-p) :skip-match 'narf/sp-org-skip-asterisk)
(sp-local-pair "*" "*" :unless '(sp-point-after-word-p sp-point-at-bol-p) :skip-match 'doom/sp-org-skip-asterisk)
(sp-local-pair "_" "_" :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-symbol-p))
(sp-local-pair "/" "/" :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-symbol-p) :post-handlers '(("[d1]" "SPC")))
(sp-local-pair "~" "~" :unless '(sp-point-before-word-p sp-point-after-word-p sp-point-before-symbol-p) :post-handlers '(("[d1]" "SPC")))
@ -213,12 +213,12 @@
(sp-local-pair "$$" "$$" :post-handlers '((:add " | ")) :unless '(sp-point-at-bol-p))
(sp-local-pair "{" nil)))
(defun narf|org-keybinds ()
(defun doom|org-keybinds ()
(map! (:map org-mode-map
"RET" nil
"C-j" nil
"C-k" nil
:i [remap narf/inflate-space-maybe] 'org-self-insert-command
:i [remap doom/inflate-space-maybe] 'org-self-insert-command
:i "RET" 'org-return-indent)
(:map evil-org-mode-map
@ -227,36 +227,36 @@
:ni "A-k" 'org-metaup
:ni "A-j" 'org-metadown
;; Expand tables (or shiftmeta move)
:ni "A-L" 'narf/org-table-append-field-or-shift-right
:ni "A-H" 'narf/org-table-prepend-field-or-shift-left
:ni "A-K" 'narf/org-table-prepend-row-or-shift-up
:ni "A-J" 'narf/org-table-append-row-or-shift-down
:ni "A-L" 'doom/org-table-append-field-or-shift-right
:ni "A-H" 'doom/org-table-prepend-field-or-shift-left
:ni "A-K" 'doom/org-table-prepend-row-or-shift-up
:ni "A-J" 'doom/org-table-append-row-or-shift-down
:i "C-L" 'narf/org-table-next-field
:i "C-H" 'narf/org-table-previous-field
:i "C-K" 'narf/org-table-previous-row
:i "C-J" 'narf/org-table-next-row
:i "C-L" 'doom/org-table-next-field
:i "C-H" 'doom/org-table-previous-field
:i "C-K" 'doom/org-table-previous-row
:i "C-J" 'doom/org-table-next-row
:i "C-e" 'org-end-of-line
:i "C-a" 'org-beginning-of-line
:i "<tab>" 'narf/org-indent
:i "<S-tab>" 'narf/org-dedent
:i "<tab>" 'doom/org-indent
:i "<S-tab>" 'doom/org-dedent
:nv "j" 'evil-next-visual-line
:nv "k" 'evil-previous-visual-line
:v "<S-tab>" 'narf/yas-insert-snippet
:v "<S-tab>" 'doom/yas-insert-snippet
:i "M-a" (λ! (evil-visual-state) (org-mark-element))
:n "M-a" 'org-mark-element
:v "M-a" 'mark-whole-buffer
:ni "<M-return>" (λ! (narf/org-insert-item 'below))
:ni "<S-M-return>" (λ! (narf/org-insert-item 'above))
:ni "<M-return>" (λ! (doom/org-insert-item 'below))
:ni "<S-M-return>" (λ! (doom/org-insert-item 'above))
:i "M-b" (λ! (narf/org-surround "*")) ; bold
:i "M-u" (λ! (narf/org-surround "_")) ; underline
:i "M-i" (λ! (narf/org-surround "/")) ; italics
:i "M-`" (λ! (narf/org-surround "+")) ; strikethrough
:i "M-b" (λ! (doom/org-surround "*")) ; bold
:i "M-u" (λ! (doom/org-surround "_")) ; underline
:i "M-i" (λ! (doom/org-surround "/")) ; italics
:i "M-`" (λ! (doom/org-surround "+")) ; strikethrough
:v "M-b" "S*"
:v "M-u" "S_"
@ -265,7 +265,7 @@
(:leader
:n ";" 'helm-org-in-buffer-headings
:n "oa" 'narf/org-attachment-reveal)
:n "oa" 'doom/org-attachment-reveal)
(:localleader
:n "/" 'org-sparse-tree
@ -276,18 +276,18 @@
:n "=" 'org-align-all-tags
:nv "l" 'org-insert-link
:n "L" 'org-store-link
:n "x" 'narf/org-remove-link
:n "x" 'doom/org-remove-link
;; :n "w" 'writing-mode
:n "v" 'variable-pitch-mode
:n "SPC" 'narf/org-toggle-checkbox
:n "SPC" 'doom/org-toggle-checkbox
:n "RET" 'org-archive-subtree
:n "a" 'org-agenda
:n "A" 'narf:org-attachment-list
:n "A" 'doom:org-attachment-list
:n "d" 'org-time-stamp
:n "D" 'org-deadline
:n "i" 'narf/org-toggle-inline-images-at-point
:n "i" 'doom/org-toggle-inline-images-at-point
:n "t" (λ! (org-todo (if (org-entry-is-todo-p) 'none 'todo)))
:v "t" (λ! (evil-ex-normal evil-visual-beginning evil-visual-end "\\t"))
:n "T" 'org-todo
@ -312,7 +312,7 @@
:m "]l" 'org-next-link
:m "[l" 'org-previous-link
:n "RET" 'narf/org-dwim-at-point
:n "RET" 'doom/org-dwim-at-point
:m "gh" 'outline-up-heading
:m "gj" 'org-forward-heading-same-level

View file

@ -10,14 +10,14 @@
:init
(add-hook 'php-mode-hook 'flycheck-mode)
(setq php-template-compatibility nil
php-extras-eldoc-functions-file (concat narf-temp-dir "/php-extras-eldoc-functions"))
php-extras-eldoc-functions-file (concat doom-temp-dir "/php-extras-eldoc-functions"))
:config
(def-repl! php-mode php-boris)
(def-docset! php-mode "php,laravel")
(def-company-backend! php-mode '(php-extras-company company-yasnippet))
(map! :map php-mode-map (:localleader :nv ";" 'narf/append-semicolon))
(map! :map php-mode-map (:localleader :nv ";" 'doom/append-semicolon))
(sp-with-modes '(php-mode)
(sp-local-pair "/*" "*/" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))
@ -85,7 +85,7 @@
:files ("composer.json")
:when
(lambda (&rest _)
(let* ((project-path (narf/project-root))
(let* ((project-path (doom/project-root))
(hash (gethash project-path php-composer-conf))
(package-file (f-expand "composer.json" project-path))
deps)

View file

@ -5,7 +5,7 @@
:commands (processing-mode processing-find-sketch)
:mode "\\.pde$"
:init
(add-hook 'processing-compilation-mode-hook 'narf|hide-mode-line)
(add-hook 'processing-compilation-mode-hook 'doom|hide-mode-line)
:config
(def-builder! processing-mode processing-sketch-build)
@ -28,7 +28,7 @@
(quickrun-add-command
"processing" `((:command . ,processing-location)
(:exec . (lambda () (format "--sketch=%s --output=%s --force --run"
(narf/project-root) processing-output-dir)))
(doom/project-root) processing-output-dir)))
(:description . "Run Processing sketch"))
:mode 'processing-mode))

View file

@ -6,7 +6,7 @@
:commands python-mode
:init
(setq-default
python-environment-directory narf-temp-dir
python-environment-directory doom-temp-dir
python-shell-interpreter "ipython"
python-shell-interpreter-args "--deep-reload"
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
@ -23,7 +23,7 @@
(def-company-backend! python-mode (anaconda))
(def-docset! python-mode "py,py3,python")
(def-version-cmd! python-mode "python --version 2>&1 | cut -d' ' -f2")
(def-repl! python-mode narf/inf-python)
(def-repl! python-mode doom/inf-python)
(define-key python-mode-map (kbd "DEL") nil)) ; interferes with smartparens
@ -31,14 +31,14 @@
:after python
:init
(add-hook! python-mode '(anaconda-mode anaconda-eldoc-mode eldoc-mode))
(setq anaconda-mode-installation-directory (concat narf-temp-dir "/anaconda/")
(setq anaconda-mode-installation-directory (concat doom-temp-dir "/anaconda/")
anaconda-mode-eldoc-as-single-line t)
:config
(map! :map anaconda-mode-map :m "gd" 'anaconda-mode-find-definitions)
(map! :map anaconda-nav-mode-map :n [escape] 'anaconda-nav-quit)
(advice-add 'anaconda-mode-doc-buffer :after 'narf*anaconda-mode-doc-buffer))
(advice-add 'anaconda-mode-doc-buffer :after 'doom*anaconda-mode-doc-buffer))
(use-package company-anaconda
:after anaconda-mode

View file

@ -12,8 +12,8 @@
(use-package racer
:after rust-mode
:preface
(setq racer-cmd (concat narf-ext-dir "/racer")
racer-rust-src-path (concat narf-ext-dir "/rust/src/"))
(setq racer-cmd (concat doom-ext-dir "/racer")
racer-rust-src-path (concat doom-ext-dir "/rust/src/"))
:when (f-exists? racer-cmd)
:init (add-hook! rust-mode '(racer-mode eldoc-mode flycheck-rust-setup))
:config

View file

@ -6,22 +6,22 @@
("/\\.?bash\\(/.*\\|rc\\|_profile\\)$" . sh-mode))
:init
(add-hook! sh-mode
'(flycheck-mode narf|sh-extra-font-lock-activate))
'(flycheck-mode doom|sh-extra-font-lock-activate))
:config
(def-company-backend! sh-mode (shell))
(def-electric! sh-mode :words ("else" "elif" "fi" "done"))
(def-repl! sh-mode narf/inf-shell)
(def-repl! sh-mode doom/inf-shell)
(setq sh-indent-after-continuation 'always)
;; [pedantry intensifies]
(add-hook! sh-mode (setq mode-name "sh"))
(sp-with-modes '(sh-mode)
(sp-local-pair "case" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "if" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "for" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "elif" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "while" "" :when '(("SPC")) :post-handlers '((:add narf/sp-insert-yasnippet)) :actions '(insert))))
(sp-local-pair "case" "" :when '(("SPC")) :post-handlers '((:add doom/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "if" "" :when '(("SPC")) :post-handlers '((:add doom/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "for" "" :when '(("SPC")) :post-handlers '((:add doom/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "elif" "" :when '(("SPC")) :post-handlers '((:add doom/sp-insert-yasnippet)) :actions '(insert))
(sp-local-pair "while" "" :when '(("SPC")) :post-handlers '((:add doom/sp-insert-yasnippet)) :actions '(insert))))
(use-package company-shell
:after sh-script

View file

@ -17,12 +17,12 @@
"<M-right>" nil
;; Assumes you have a markdown renderer plugin in chrome
:nv "M-r" (λ! (narf-open-with "Google Chrome"))
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
"M-*" 'markdown-insert-list-item
"M-b" 'markdown-insert-bold
"M-i" 'markdown-insert-italic
"M-`" 'narf/markdown-insert-del
"M-`" 'doom/markdown-insert-del
(:localleader
:nv "i" 'markdown-insert-image

View file

@ -10,8 +10,8 @@
(push '("jade" "html") projectile-other-file-alist)
(push '("pug" "html") projectile-other-file-alist)
(map! :map pug-mode-map
:i [tab] 'narf/dumb-indent
:i [backtab] 'narf/dumb-dedent))
:i [tab] 'doom/dumb-indent
:i [backtab] 'doom/dumb-dedent))
(use-package web-mode
:mode ("\\.p?html?$"
@ -37,7 +37,7 @@
(map! :map web-mode-map
"M-/" 'web-mode-comment-or-uncomment
:n "M-r" 'narf/web-refresh-browser
:n "M-r" 'doom/web-refresh-browser
:n "za" 'web-mode-fold-or-unfold
(:localleader :n "t" 'web-mode-element-rename)
@ -77,7 +77,7 @@
:files ("bower.json")
:when
(lambda (&rest _)
(let* ((project-path (narf/project-root))
(let* ((project-path (doom/project-root))
(hash (gethash project-path bower-conf))
(package-file (f-expand "bower.json" project-path))
deps)
@ -90,7 +90,7 @@
:modes (nodejs-project-mode bower-project-mode)
:when
(lambda (&rest _)
(let* ((project (narf/project-root))
(let* ((project (doom/project-root))
(bower (gethash project bower-conf))
(npm (gethash project npm-conf))
(deps (append (cdr-safe (assq 'dependencies bower))