Skip to content

Commit

Permalink
Add flutter-run-args variable (#29)
Browse files Browse the repository at this point in the history
* Add flutter-args

* Make flutter-run prefer local args if set

This commit makes it possible to run `flutter-run` with `C-u`
to specify args, even if `flutter-args` is set.

* Change flutter-args to flutter-run-args
  • Loading branch information
storvik authored Feb 2, 2024
1 parent 285eb86 commit 004c91e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flutter.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
(defvar flutter-sdk-path nil
"Path to Flutter SDK.")

(defvar flutter-run-args nil
"Space-delimited string of CLI flags passed to `flutter-run'.")


;;; Key bindings

Expand Down Expand Up @@ -259,7 +262,7 @@ args."
(list (when current-prefix-arg
(read-string "Args: "))))
(flutter--with-run-proc
args
(or args flutter-run-args)
(display-buffer buffer)))

(defun flutter--devices ()
Expand Down

0 comments on commit 004c91e

Please sign in to comment.