General module refactor
This commit is contained in:
parent
0bd576673c
commit
7c9e96da87
14 changed files with 63 additions and 54 deletions
|
@ -4,16 +4,11 @@
|
|||
(after! clojure-mode
|
||||
(add-hook 'clojure-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
(set-popup-rules!
|
||||
'(("^\\*cider-error*" :ignore t)
|
||||
("^\\*cider-repl" :quit nil)
|
||||
("^\\*cider-repl-history" :vslot 2 :ttl nil)))
|
||||
|
||||
(def-package! cider
|
||||
;; NOTE: if you don't have an org directory set (the dir doesn't exist),
|
||||
;; cider jack in won't work.
|
||||
:commands (cider-jack-in cider-jack-in-clojurescript)
|
||||
:hook (clojure-mode . cider-mode)
|
||||
:hook (clojure-mode-local-vars . cider-mode)
|
||||
:init
|
||||
(set-repl-handler! 'clojure-mode #'+clojure/repl)
|
||||
(set-eval-handler! 'clojure-mode #'cider-eval-region)
|
||||
|
@ -22,6 +17,11 @@
|
|||
:documentation #'cider-doc)
|
||||
(add-hook 'cider-mode-hook #'eldoc-mode)
|
||||
:config
|
||||
(set-popup-rules!
|
||||
'(("^\\*cider-error*" :ignore t)
|
||||
("^\\*cider-repl" :quit nil)
|
||||
("^\\*cider-repl-history" :vslot 2 :ttl nil)))
|
||||
|
||||
(setq nrepl-hide-special-buffers t
|
||||
nrepl-log-messages nil
|
||||
cider-font-lock-dynamically '(macro core function var)
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
;; `coq'
|
||||
(setq proof-electric-terminator-enable t)
|
||||
|
||||
;; We've replaced coq-mode abbrevs with yasnippet snippets (in the snippets
|
||||
;; library included with Doom).
|
||||
(setq coq-mode-abbrev-table '())
|
||||
|
||||
|
||||
(after! company-coq
|
||||
(set-popup-rule! "^\\*\\(?:response\\|goals\\)\\*" :ignore t)
|
||||
(set-lookup-handlers! 'company-coq-mode
|
||||
|
|
|
@ -3,20 +3,10 @@
|
|||
(def-package! elixir-mode
|
||||
:defer t
|
||||
:init
|
||||
;; Disable default smartparens config; there are too many, they're intrusive
|
||||
;; and we only want a subset of them (defined below).
|
||||
;; Disable default smartparens config. There are too many pairs; we only want
|
||||
;; a subset of them (defined below).
|
||||
(provide 'smartparens-elixir)
|
||||
:config
|
||||
;; ...and only complete the basics
|
||||
(after! smartparens
|
||||
(sp-with-modes 'elixir-mode
|
||||
(sp-local-pair "do" "end"
|
||||
:when '(("RET" "<evil-ret>"))
|
||||
:unless '(sp-in-comment-p sp-in-string-p)
|
||||
: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"
|
||||
|
@ -30,6 +20,16 @@
|
|||
:for "for"
|
||||
:return "return" :yield "use")
|
||||
|
||||
;; ...and only complete the basics
|
||||
(after! smartparens
|
||||
(sp-with-modes 'elixir-mode
|
||||
(sp-local-pair "do" "end"
|
||||
:when '(("RET" "<evil-ret>"))
|
||||
:unless '(sp-in-comment-p sp-in-string-p)
|
||||
: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))))
|
||||
|
||||
(def-package! alchemist-company
|
||||
:when (featurep! :completion company)
|
||||
:commands alchemist-company
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
(after! elm-mode
|
||||
(add-hook 'elm-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
(set-company-backend! 'elm-mode 'company-elm)
|
||||
(set-repl-handler! 'elm-mode #'run-elm-interactive)
|
||||
(set-pretty-symbols! 'elm-mode
|
||||
|
@ -22,4 +23,3 @@
|
|||
:when (featurep! :tools flycheck)
|
||||
:after elm-mode
|
||||
:config (add-to-list 'flycheck-checkers 'elm nil #'eq))
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
|
||||
(add-hook! 'emacs-lisp-mode-hook
|
||||
#'(;; 3rd-party functionality
|
||||
auto-compile-on-save-mode outline-minor-mode
|
||||
auto-compile-on-save-mode
|
||||
outline-minor-mode
|
||||
;; initialization
|
||||
+emacs-lisp|extend-imenu))
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
;;; private/erlang/config.el -*- lexical-binding: t; -*-
|
||||
;;; lang/erlang/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(dolist (regexp '("\\.erlang$"
|
||||
;; rebar files
|
||||
"/rebar\\.config\\(?:\\.script\\)?$"
|
||||
;; erlang configs
|
||||
"/\\(?:app\\|sys\\)\\.config$"))
|
||||
(add-to-list 'auto-mode-alist (cons regexp 'erlang-mode)))
|
||||
(def-package! erlang
|
||||
:mode ("\\.erlang$" . erlang-mode)
|
||||
:mode ("/rebar\\.config\\(?:\\.script\\)?$" . erlang-mode)
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config$" . erlang-mode))
|
||||
|
||||
|
||||
(def-package! flycheck-rebar3
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
:config
|
||||
(setq ess-offset-continued 'straight
|
||||
ess-expression-offset 2
|
||||
ess-use-flymake (not (featurep! :tools flycheck))
|
||||
ess-nuke-trailing-whitespace-p t
|
||||
ess-default-style 'DEFAULT
|
||||
ess-history-directory (expand-file-name "ess-history/" doom-cache-dir))
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
(def-package! markdown-mode
|
||||
:mode ("/README\\(?:\\.\\(?:markdown\\|md\\)\\)?\\'" . gfm-mode)
|
||||
:init
|
||||
(when (featurep! +pandoc)
|
||||
(setq markdown-command "pandoc --from=markdown --to=html --standalone --mathjax --highlight-style=pygments"))
|
||||
|
||||
(setq markdown-enable-wiki-links t
|
||||
markdown-italic-underscore t
|
||||
markdown-asymmetric-header t
|
||||
|
@ -17,7 +14,10 @@
|
|||
markdown-gfm-uppercase-checkbox t) ; for compat with org-mode
|
||||
|
||||
:config
|
||||
(set-flyspell-predicate! '(markdown-mode gfm-mode) #'+markdown-flyspell-word-p)
|
||||
(set-flyspell-predicate! '(markdown-mode gfm-mode)
|
||||
#'+markdown-flyspell-word-p)
|
||||
(set-lookup-handlers! '(markdown-mode gfm-mode)
|
||||
:file #'markdown-follow-thing-at-point)
|
||||
|
||||
(defun +markdown|set-fill-column-and-line-spacing ()
|
||||
(setq-local line-spacing 2)
|
||||
|
@ -25,8 +25,10 @@
|
|||
(add-hook 'markdown-mode-hook #'+markdown|set-fill-column-and-line-spacing)
|
||||
(add-hook 'markdown-mode-hook #'auto-fill-mode)
|
||||
|
||||
(sp-with-modes '(markdown-mode gfm-mode)
|
||||
(sp-local-pair "```" "```" :post-handlers '(:add ("||\n[i]" "RET"))))
|
||||
|
||||
(map! :map markdown-mode-map
|
||||
[remap find-file-at-point] #'markdown-follow-thing-at-point
|
||||
"M-*" #'markdown-insert-list-item
|
||||
"M-b" #'markdown-insert-bold
|
||||
"M-i" #'markdown-insert-italic
|
||||
|
@ -51,7 +53,9 @@
|
|||
"i" #'markdown-insert-image
|
||||
"l" #'markdown-insert-link))))
|
||||
|
||||
|
||||
(def-package! pandoc-mode
|
||||
:when (featurep! +pandoc)
|
||||
:commands pandoc-mode
|
||||
:hook (markdown-mode . conditionally-turn-on-pandoc))
|
||||
:hook (markdown-mode . conditionally-turn-on-pandoc)
|
||||
:init (setq markdown-command "pandoc --from=markdown --to=html --standalone --mathjax --highlight-style=pygments"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue