Minor refactors & revision across the board

This commit is contained in:
Henrik Lissner 2020-07-31 01:39:24 -04:00
parent a54d2b3804
commit 6a64f37435
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
11 changed files with 48 additions and 35 deletions

View file

@ -74,10 +74,14 @@ For example:
(package! other-package)
,#+END_SRC
,#+BEGIN_SRC sh :tangle ~/.dotfiles/bin/script.sh
,#+BEGIN_SRC sh :tangle ~/.dotfiles/bin/script.sh :tangle-mode (identity #o755)
#!/usr/bin/env bash
echo Hello world
,#+END_SRC
,#+BEGIN_SRC sh :tangle ~/.dotfiles/bin/script.sh :shebang "#!/usr/bin/env bash"
echo Hello world
,#+END_SRC
#+END_SRC
** Modularizing your literate config with ~#+INCLUDE~ directives

View file

@ -15,8 +15,8 @@ byte-compiled from.")
(print! (start "Compiling your literate config..."))
(print-group!
(let* ((default-directory doom-private-dir)
(org (expand-file-name +literate-config-file))
(dest (concat (file-name-sans-extension +literate-config-file) ".el"))
(org (expand-file-name +literate-config-file))
(dest (concat (file-name-sans-extension +literate-config-file) ".el"))
(backup (make-temp-file "config.org.backup")))
(and (require 'ox)
(require 'ob-tangle)
@ -24,17 +24,16 @@ byte-compiled from.")
(letf! ((defun message (msg &rest args)
(when msg
(print! (info "%s") (apply #'format msg args))))
;; Prevent infinite recursion due to
;; recompile-on-save hooks later.
;; Prevent infinite recursion due to recompile-on-save
;; hooks later.
(org-mode-hook nil))
;; We do the ol' switcheroo because `org-babel-tangle'
;; writes changes to the current file, which would be
;; imposing on the user.
;; Do the ol' switcheroo because `org-babel-tangle' writes
;; changes to the user's literate config, which would impose on
;; the user.
(copy-file org backup t)
(with-current-buffer (find-file-noselect org)
;; Tangling doesn't expand #+INCLUDE directives, so we
;; do it ourselves, since includes are so useful for
;; literate configs!
;; Tangling won't ordinarily expand #+INCLUDE directives, so
;; we do it ourselves.
(org-export-expand-include-keyword)
(org-babel-tangle nil dest))
t)

View file

@ -11,9 +11,10 @@ This modules adds [[https://github.com/clemera/objed][objed]], a global minor-mo
text objects. It combines the ideas of versor-mode and other editors like Vim or
Kakoune and tries to align them with regular Emacs conventions.
Note that =objed= is intended as an *alternative* to =evil=, for people who
prefer standard Emacs key-bindings and conventions. It's not recommended to use
these modules together.
#+begin_quote
This module is incompatible with the =:editor evil=. Enabling them both will
cause errors.
#+end_quote
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.

View file

@ -3,10 +3,6 @@
(after! projectile
(add-to-list 'projectile-project-root-files "mix.exs"))
(after! highlight-numbers
(puthash 'elixir-mode
"\\_<-?[[:digit:]]+\\(?:_[[:digit:]]\\{3\\}\\)*\\_>"
highlight-numbers-modelist))
;;
;;; Packages
@ -41,7 +37,12 @@
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))
(when (featurep! +lsp)
(add-hook 'elixir-mode-local-vars-hook #'lsp!)))
(add-hook 'elixir-mode-local-vars-hook #'lsp!))
(after! highlight-numbers
(puthash 'elixir-mode
"\\_<-?[[:digit:]]+\\(?:_[[:digit:]]\\{3\\}\\)*\\_>"
highlight-numbers-modelist)))
(use-package! flycheck-credo

View file

@ -43,6 +43,8 @@ This module provides no flags.
(in [[file:../../../docs/api.org][docs/api.org]]).
+ This module extends imenu support for Doom's API (e.g. ~package!~,
~use-package~, ~after!~)
+ Flycheck has been configured to tone down the false positives when you are
editing your Emacs or Doom config.
* Prerequisites
This module's sole dependency is Emacs. It's very obscure, you wouldn't know

View file

@ -222,8 +222,7 @@ verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'."
(or (not default-directory)
(cl-find-if (doom-partial #'file-in-directory-p default-directory)
+emacs-lisp-disable-flycheck-in-dirs)))
(add-to-list (make-local-variable 'flycheck-disabled-checkers)
'emacs-lisp-checkdoc)
(add-to-list 'flycheck-disabled-checkers 'emacs-lisp-checkdoc)
(set (make-local-variable 'flycheck-emacs-lisp-check-form)
(concat "(progn "
(prin1-to-string

View file

@ -12,6 +12,10 @@
:config
(set-lookup-handlers! 'gdscript-mode
:documentation #'gdscript-docs-browse-symbol-at-point)
(when (featurep! +lsp)
(add-hook 'gdscript-mode-local-vars-hook #'lsp!))
(map! :localleader
:map gdscript-mode-map
@ -27,7 +31,4 @@
(:prefix ("f" . "format")
"b" #'gdscript-format-buffer
"r" #'gdscript-format-region))
(when (featurep! +lsp)
(add-hook 'gdscript-mode-local-vars-hook #'lsp!)))
"r" #'gdscript-format-region)))

View file

@ -37,10 +37,14 @@
:desc "Tomorrow" "m" #'org-roam-dailies-tomorrow
:desc "Yesterday" "y" #'org-roam-dailies-yesterday))
:config
(setq org-roam-directory (file-name-as-directory (expand-file-name (or org-roam-directory "roam")
org-directory))
org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU
org-roam-buffer-window-parameters '((no-delete-other-windows . t)) ; make org-roam buffer sticky
(setq org-roam-directory
(file-name-as-directory
(expand-file-name (or org-roam-directory "roam")
org-directory))
org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU
;; Make org-roam buffer sticky; i.e. don't replace it when opening a
;; file with an *-other-window command.
org-roam-buffer-window-parameters '((no-delete-other-windows . t))
org-roam-completion-system
(cond ((featurep! :completion helm) 'helm)
((featurep! :completion ivy) 'ivy)

View file

@ -92,6 +92,7 @@ The features in this module optionally depend on the following php packages:
+ ~boris~ (REPL)
+ ~phpctags~ (better code completion)
+ ~phpunit~ (unit test commands)
+ ~php-cs-fixer~ (for code formatting)
#+BEGIN_SRC sh
composer global require \

View file

@ -35,9 +35,10 @@
(when solaire-global-mode
(solaire-global-mode -1))))))
(add-hook! 'solaire-global-mode-hook
(add-hook! 'solaire-global-mode-hook :append
(defun +doom-solaire-swap-bg-faces-maybe-h ()
(and solaire-global-mode
(and (bound-and-true-p solaire-global-mode)
(symbolp doom-theme)
(string-prefix-p "doom-" (symbol-name doom-theme))
(solaire-mode-swap-bg))))

View file

@ -364,8 +364,8 @@ Ugh, such an ugly hack."
(defadvice! +popup--ignore-window-parameters-a (orig-fn &rest args)
"Allow *interactive* window moving commands to traverse popups."
:around '(windmove-up windmove-down windmove-left windmove-right)
(letf! ((defun windmove-find-other-window (dir &optional arg window)
(window-in-direction
(pcase dir (`up 'above) (`down 'below) (_ dir))
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t)))
(letf! (defun windmove-find-other-window (dir &optional arg window)
(window-in-direction
(pcase dir (`up 'above) (`down 'below) (_ dir))
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t))
(apply orig-fn args)))