Compare commits

..

3 Commits

Author SHA1 Message Date
Jeremy Dormitzer
621e4aea64 Add function to set the frame font 2021-02-26 16:47:28 -05:00
Jeremy Dormitzer
4f8d3e4fec Add pip recipe for run-command 2021-02-26 16:47:18 -05:00
Jeremy Dormitzer
50ed29d013 Process ansi escape sequences in compilation buffers 2021-02-26 16:46:57 -05:00
3 changed files with 25 additions and 2 deletions

View File

@ -62,7 +62,15 @@
:straight (:type built-in)
:commands compile
:config
(evil-collection-compile-setup))
(evil-collection-compile-setup)
(defun postprocess-compilation-buffer ()
(goto-char compilation-filter-start)
(when (looking-at "\033c")
(delete-region (point-min) (match-end 0)))
(ansi-color-apply-on-region (point) (point-max)))
(add-hook 'compilation-filter-hook 'postprocess-compilation-buffer))
;; Code formatting library
(use-package apheleia

View File

@ -183,6 +183,13 @@
:command-line "web-ext build"
:working-dir dir))))
(defun run-command-recipe-pip ()
(when (and (buffer-file-name)
(string-match-p ".*requirements.*txt$" (buffer-file-name)))
(list
(list :command-name "install"
:command-line (format "pip install -r %s" (buffer-file-name))))))
:general
(leader-map "\"" #'run-command)
(run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile)
@ -200,6 +207,7 @@
run-command-recipe-kustomize
run-command-recipe-sops
run-command-recipe-pytest
run-command-recipe-web-ext)))
run-command-recipe-web-ext
run-command-recipe-pip)))
(provide 'init-run-command)

View File

@ -19,4 +19,11 @@
(use-package hide-mode-line
:commands hide-mode-line-mode)
;; A function to set the frame font
(defun set-font (font)
"Set the frame font to `font'"
(interactive (list (completing-read "Font: "
(delete-dups (font-family-list)))))
(set-frame-font font))
(provide 'init-ui)