From 004c91e070a9b4a2a5042f5bb20015ec65453acf Mon Sep 17 00:00:00 2001 From: "Petter S. Storvik" Date: Fri, 2 Feb 2024 13:41:04 +0100 Subject: [PATCH] Add flutter-run-args variable (#29) * 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 --- flutter.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flutter.el b/flutter.el index 684e50b..928cbdf 100644 --- a/flutter.el +++ b/flutter.el @@ -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 @@ -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 ()