mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
General cleanup & minor refactoring
This commit is contained in:
@ -3,7 +3,8 @@
|
||||
(def-package! elixir-mode
|
||||
:defer t
|
||||
:init
|
||||
;; disable default smartparens config
|
||||
;; Disable default smartparens config; there are too many, they're intrusive
|
||||
;; and we only want a subset of them (defined below).
|
||||
(provide 'smartparens-elixir)
|
||||
:config
|
||||
;; ...and only complete the basics
|
||||
@ -15,6 +16,7 @@
|
||||
:post-handlers '("||\n[i]"))
|
||||
(sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p))
|
||||
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p))))
|
||||
|
||||
(set-pretty-symbols! 'elixir-mode
|
||||
;; Functional
|
||||
:def "def"
|
||||
|
@ -12,4 +12,3 @@
|
||||
"Opens a Haskell REPL."
|
||||
(interactive "P")
|
||||
(display-buffer (+haskell-repl-buffer arg)))
|
||||
|
||||
|
@ -77,7 +77,7 @@ If no viewers are found, `latex-preview-pane' is used.")
|
||||
"\\Bigl\\{" "\\Biggl\\{"
|
||||
"\\lfloor" "\\lceil" "\\langle"
|
||||
"\\lVert" "\\lvert" "`"))
|
||||
(sp-local-pair modes open nil :actions nil))
|
||||
(sp-local-pair modes open nil :actions :rem))
|
||||
(sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))))
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ the first function to return non-nil.")
|
||||
t))
|
||||
(advice-add #'org-babel-confirm-evaluate :after-while #'+org*babel-lazy-load-library)
|
||||
|
||||
;; I prefer C-c C-c over C-c '
|
||||
;; I prefer C-c C-c over C-c ' (more consistent)
|
||||
(define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit)
|
||||
|
||||
;; `org-babel-get-header' was removed from org in 9.0. Quite a few babel
|
||||
@ -69,7 +69,7 @@ the first function to return non-nil.")
|
||||
(setq ob-ipython-resources-dir ".ob-ipython-resrc")
|
||||
|
||||
(defun +org|babel-load-ipython (lang)
|
||||
(and (string-match-p "^jupyter-" (symbol-name lang))
|
||||
(and (string-prefix-p "jupyter-" (symbol-name lang))
|
||||
(require 'ob-ipython nil t)))
|
||||
(add-hook '+org-babel-load-functions #'+org|babel-load-ipython)
|
||||
:config
|
||||
|
@ -45,7 +45,7 @@
|
||||
(add-hook 'sh-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
;; autoclose backticks
|
||||
(sp-local-pair 'sh-mode "`" nil :unless '(sp-point-before-word-p sp-point-before-same-p))
|
||||
(sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p))
|
||||
|
||||
;; sh-mode has file extensions checks for other shells, but not zsh, so...
|
||||
(defun +sh|detect-zsh ()
|
||||
|
Reference in New Issue
Block a user