Skip to content

Commit

Permalink
feat: Add nix3-compile-in-comint-mode option
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Jul 28, 2024
1 parent 2ef90c0 commit d47007f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion nix3-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
"String used as a separator in `completing-read-multiple'."
:type 'string)

(defcustom nix3-compile-in-comint-mode t
"Whether to run `compile' in `comint-mode'.
If this option is t, background nix processes will be run in
`comint-mode' with `compilation-shell-minor-mode'. See `compile' for details."
:type 'boolean)

;;;; Variables

(defvar nix3-config-cache nil)
Expand Down Expand Up @@ -99,7 +106,8 @@ This command discard the exit code or output of the command."
;; Use compile for now, but it may be a better way
(compile (mapconcat #'shell-quote-argument
(cons cmd args)
" ")))
" ")
nix3-compile-in-comint-mode))

(defun nix3-system ()
"Return the system name of Nix."
Expand Down
3 changes: 2 additions & 1 deletion nix3-flake.el
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,8 @@ non-interactively."
(concat "nix flake lock "
(mapconcat (lambda (name)
(format "--update-input %s" name))
names " "))))))
names " ")))
nix3-compile-in-comint-mode)))

(provide 'nix3-flake)
;;; nix3-flake.el ends here

0 comments on commit d47007f

Please sign in to comment.