diff options
author | Griffin Smith <root@gws.fyi> | 2020-03-26T19·03-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2020-03-26T19·03-0400 |
commit | 35c76e7098111ed0d84aef1bd09f7025ce728b87 (patch) | |
tree | cea6f3893ffb3b983fdc42b4c38aa5c3c1a5fe36 /nix-yapf-mode.el | |
parent | 23b179ad1d3d2e07c114741dffc50a8343f0a7a6 (diff) |
Many updates, too many to count
commit messages are for code, not config I guess
Diffstat (limited to 'nix-yapf-mode.el')
-rw-r--r-- | nix-yapf-mode.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nix-yapf-mode.el b/nix-yapf-mode.el new file mode 100644 index 000000000000..9dba47bd3614 --- /dev/null +++ b/nix-yapf-mode.el @@ -0,0 +1,21 @@ +;;; ~/.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) |