Minor refactors & revision across the board
This commit is contained in:
parent
a54d2b3804
commit
6a64f37435
11 changed files with 48 additions and 35 deletions
|
@ -74,10 +74,14 @@ For example:
|
||||||
(package! other-package)
|
(package! other-package)
|
||||||
,#+END_SRC
|
,#+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
|
#!/usr/bin/env bash
|
||||||
echo Hello world
|
echo Hello world
|
||||||
,#+END_SRC
|
,#+END_SRC
|
||||||
|
|
||||||
|
,#+BEGIN_SRC sh :tangle ~/.dotfiles/bin/script.sh :shebang "#!/usr/bin/env bash"
|
||||||
|
echo Hello world
|
||||||
|
,#+END_SRC
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Modularizing your literate config with ~#+INCLUDE~ directives
|
** Modularizing your literate config with ~#+INCLUDE~ directives
|
||||||
|
|
|
@ -15,8 +15,8 @@ byte-compiled from.")
|
||||||
(print! (start "Compiling your literate config..."))
|
(print! (start "Compiling your literate config..."))
|
||||||
(print-group!
|
(print-group!
|
||||||
(let* ((default-directory doom-private-dir)
|
(let* ((default-directory doom-private-dir)
|
||||||
(org (expand-file-name +literate-config-file))
|
(org (expand-file-name +literate-config-file))
|
||||||
(dest (concat (file-name-sans-extension +literate-config-file) ".el"))
|
(dest (concat (file-name-sans-extension +literate-config-file) ".el"))
|
||||||
(backup (make-temp-file "config.org.backup")))
|
(backup (make-temp-file "config.org.backup")))
|
||||||
(and (require 'ox)
|
(and (require 'ox)
|
||||||
(require 'ob-tangle)
|
(require 'ob-tangle)
|
||||||
|
@ -24,17 +24,16 @@ byte-compiled from.")
|
||||||
(letf! ((defun message (msg &rest args)
|
(letf! ((defun message (msg &rest args)
|
||||||
(when msg
|
(when msg
|
||||||
(print! (info "%s") (apply #'format msg args))))
|
(print! (info "%s") (apply #'format msg args))))
|
||||||
;; Prevent infinite recursion due to
|
;; Prevent infinite recursion due to recompile-on-save
|
||||||
;; recompile-on-save hooks later.
|
;; hooks later.
|
||||||
(org-mode-hook nil))
|
(org-mode-hook nil))
|
||||||
;; We do the ol' switcheroo because `org-babel-tangle'
|
;; Do the ol' switcheroo because `org-babel-tangle' writes
|
||||||
;; writes changes to the current file, which would be
|
;; changes to the user's literate config, which would impose on
|
||||||
;; imposing on the user.
|
;; the user.
|
||||||
(copy-file org backup t)
|
(copy-file org backup t)
|
||||||
(with-current-buffer (find-file-noselect org)
|
(with-current-buffer (find-file-noselect org)
|
||||||
;; Tangling doesn't expand #+INCLUDE directives, so we
|
;; Tangling won't ordinarily expand #+INCLUDE directives, so
|
||||||
;; do it ourselves, since includes are so useful for
|
;; we do it ourselves.
|
||||||
;; literate configs!
|
|
||||||
(org-export-expand-include-keyword)
|
(org-export-expand-include-keyword)
|
||||||
(org-babel-tangle nil dest))
|
(org-babel-tangle nil dest))
|
||||||
t)
|
t)
|
||||||
|
|
|
@ -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
|
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.
|
Kakoune and tries to align them with regular Emacs conventions.
|
||||||
|
|
||||||
Note that =objed= is intended as an *alternative* to =evil=, for people who
|
#+begin_quote
|
||||||
prefer standard Emacs key-bindings and conventions. It's not recommended to use
|
This module is incompatible with the =:editor evil=. Enabling them both will
|
||||||
these modules together.
|
cause errors.
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.
|
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
(after! projectile
|
(after! projectile
|
||||||
(add-to-list 'projectile-project-root-files "mix.exs"))
|
(add-to-list 'projectile-project-root-files "mix.exs"))
|
||||||
|
|
||||||
(after! highlight-numbers
|
|
||||||
(puthash 'elixir-mode
|
|
||||||
"\\_<-?[[:digit:]]+\\(?:_[[:digit:]]\\{3\\}\\)*\\_>"
|
|
||||||
highlight-numbers-modelist))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Packages
|
;;; Packages
|
||||||
|
@ -41,7 +37,12 @@
|
||||||
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))
|
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))
|
||||||
|
|
||||||
(when (featurep! +lsp)
|
(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
|
(use-package! flycheck-credo
|
||||||
|
|
|
@ -43,6 +43,8 @@ This module provides no flags.
|
||||||
(in [[file:../../../docs/api.org][docs/api.org]]).
|
(in [[file:../../../docs/api.org][docs/api.org]]).
|
||||||
+ This module extends imenu support for Doom's API (e.g. ~package!~,
|
+ This module extends imenu support for Doom's API (e.g. ~package!~,
|
||||||
~use-package~, ~after!~)
|
~use-package~, ~after!~)
|
||||||
|
+ Flycheck has been configured to tone down the false positives when you are
|
||||||
|
editing your Emacs or Doom config.
|
||||||
|
|
||||||
* Prerequisites
|
* Prerequisites
|
||||||
This module's sole dependency is Emacs. It's very obscure, you wouldn't know
|
This module's sole dependency is Emacs. It's very obscure, you wouldn't know
|
||||||
|
|
|
@ -222,8 +222,7 @@ verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'."
|
||||||
(or (not default-directory)
|
(or (not default-directory)
|
||||||
(cl-find-if (doom-partial #'file-in-directory-p default-directory)
|
(cl-find-if (doom-partial #'file-in-directory-p default-directory)
|
||||||
+emacs-lisp-disable-flycheck-in-dirs)))
|
+emacs-lisp-disable-flycheck-in-dirs)))
|
||||||
(add-to-list (make-local-variable 'flycheck-disabled-checkers)
|
(add-to-list 'flycheck-disabled-checkers 'emacs-lisp-checkdoc)
|
||||||
'emacs-lisp-checkdoc)
|
|
||||||
(set (make-local-variable 'flycheck-emacs-lisp-check-form)
|
(set (make-local-variable 'flycheck-emacs-lisp-check-form)
|
||||||
(concat "(progn "
|
(concat "(progn "
|
||||||
(prin1-to-string
|
(prin1-to-string
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
:config
|
:config
|
||||||
(set-lookup-handlers! 'gdscript-mode
|
(set-lookup-handlers! 'gdscript-mode
|
||||||
:documentation #'gdscript-docs-browse-symbol-at-point)
|
:documentation #'gdscript-docs-browse-symbol-at-point)
|
||||||
|
|
||||||
|
(when (featurep! +lsp)
|
||||||
|
(add-hook 'gdscript-mode-local-vars-hook #'lsp!))
|
||||||
|
|
||||||
(map! :localleader
|
(map! :localleader
|
||||||
:map gdscript-mode-map
|
:map gdscript-mode-map
|
||||||
|
|
||||||
|
@ -27,7 +31,4 @@
|
||||||
|
|
||||||
(:prefix ("f" . "format")
|
(:prefix ("f" . "format")
|
||||||
"b" #'gdscript-format-buffer
|
"b" #'gdscript-format-buffer
|
||||||
"r" #'gdscript-format-region))
|
"r" #'gdscript-format-region)))
|
||||||
|
|
||||||
(when (featurep! +lsp)
|
|
||||||
(add-hook 'gdscript-mode-local-vars-hook #'lsp!)))
|
|
||||||
|
|
|
@ -37,10 +37,14 @@
|
||||||
:desc "Tomorrow" "m" #'org-roam-dailies-tomorrow
|
:desc "Tomorrow" "m" #'org-roam-dailies-tomorrow
|
||||||
:desc "Yesterday" "y" #'org-roam-dailies-yesterday))
|
:desc "Yesterday" "y" #'org-roam-dailies-yesterday))
|
||||||
:config
|
:config
|
||||||
(setq org-roam-directory (file-name-as-directory (expand-file-name (or org-roam-directory "roam")
|
(setq org-roam-directory
|
||||||
org-directory))
|
(file-name-as-directory
|
||||||
org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU
|
(expand-file-name (or org-roam-directory "roam")
|
||||||
org-roam-buffer-window-parameters '((no-delete-other-windows . t)) ; make org-roam buffer sticky
|
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
|
org-roam-completion-system
|
||||||
(cond ((featurep! :completion helm) 'helm)
|
(cond ((featurep! :completion helm) 'helm)
|
||||||
((featurep! :completion ivy) 'ivy)
|
((featurep! :completion ivy) 'ivy)
|
||||||
|
|
|
@ -92,6 +92,7 @@ The features in this module optionally depend on the following php packages:
|
||||||
+ ~boris~ (REPL)
|
+ ~boris~ (REPL)
|
||||||
+ ~phpctags~ (better code completion)
|
+ ~phpctags~ (better code completion)
|
||||||
+ ~phpunit~ (unit test commands)
|
+ ~phpunit~ (unit test commands)
|
||||||
|
+ ~php-cs-fixer~ (for code formatting)
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
composer global require \
|
composer global require \
|
||||||
|
|
|
@ -35,9 +35,10 @@
|
||||||
(when solaire-global-mode
|
(when solaire-global-mode
|
||||||
(solaire-global-mode -1))))))
|
(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 ()
|
(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))
|
(string-prefix-p "doom-" (symbol-name doom-theme))
|
||||||
(solaire-mode-swap-bg))))
|
(solaire-mode-swap-bg))))
|
||||||
|
|
||||||
|
|
|
@ -364,8 +364,8 @@ Ugh, such an ugly hack."
|
||||||
(defadvice! +popup--ignore-window-parameters-a (orig-fn &rest args)
|
(defadvice! +popup--ignore-window-parameters-a (orig-fn &rest args)
|
||||||
"Allow *interactive* window moving commands to traverse popups."
|
"Allow *interactive* window moving commands to traverse popups."
|
||||||
:around '(windmove-up windmove-down windmove-left windmove-right)
|
:around '(windmove-up windmove-down windmove-left windmove-right)
|
||||||
(letf! ((defun windmove-find-other-window (dir &optional arg window)
|
(letf! (defun windmove-find-other-window (dir &optional arg window)
|
||||||
(window-in-direction
|
(window-in-direction
|
||||||
(pcase dir (`up 'above) (`down 'below) (_ dir))
|
(pcase dir (`up 'above) (`down 'below) (_ dir))
|
||||||
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t)))
|
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t))
|
||||||
(apply orig-fn args)))
|
(apply orig-fn args)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue