akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp
MIT License
937 stars 75 forks source link

[Help/Feature Request] Select a default device + launch configuration to not select them on every FlutterRun #364

Open ArinFaraj opened 5 days ago

ArinFaraj commented 5 days ago

When I run FlutterDevices i have to select a device > select a launch configuration > app runs Or FlutterRun > select a launch configuration > app runs [could run it on the unwanted device]

Using something like FlutterDefault to select a device and a launch configuration, it should be stored for this session. Then we could have something like FlutterRunDefault that runs the app on the default device/configs. I hope I get some guidance on how to implement it myself.

sidlatau commented 5 days ago

It is already possible to set the default device in the project config: https://github.com/akinsho/flutter-tools.nvim/#project-configuration - have you tried it?

ArinFaraj commented 4 days ago

Using exrc is not exactly what i wanted. here is a comparison for my case of selecting a default configration to launch it everytime i run FlutterRun

Using exrc:

Using something like FlutterDefault

You can automate a lot of things in the exrc but i believe this is a good quality of life feature that makes development faster This would be very similar to how it's done on vscode by selecting a default launch config + default device and just hitting F5 to run your app.

JordanllHarper commented 3 days ago

The exrc is for config on a per project basis, but I believe you can set up a global setup_project({...} in your config, which you can configure for your use case.