tvl-depot/nix-yapf-mode.el
Griffin Smith 35c76e7098 Many updates, too many to count
commit messages are for code, not config

I guess
2020-03-26 15:03:25 -04:00

21 lines
539 B
EmacsLisp

;;; ~/.doom.d/nix-yapf-mode.el -*- lexical-binding: t; -*-
(defun +grfn/yapfify-call-bin (input-buffer output-buffer start-line end-line)
(with-current-buffer input-buffer
(call-process-region
(point-min)
(point-max)
"nix-shell"
nil
(list output-buffer nil)
nil
"/home/griffin/code/urb/grid/yapf.nix"
"--run"
(concat
"yapf -l "
(number-to-string start-line)
"-"
(number-to-string end-line)))))
(advice-add #'yapfify-call-bin :override #'+grfn/yapfify-call-bin)