Made function 'start' in 'lua/flutter-tools.lua' public#429
Closed
obemu wants to merge 2 commits intonvim-flutter:mainfrom
Closed
Made function 'start' in 'lua/flutter-tools.lua' public#429obemu wants to merge 2 commits intonvim-flutter:mainfrom
obemu wants to merge 2 commits intonvim-flutter:mainfrom
Conversation
Collaborator
|
Registering commands in .nvim.lua is already supported via this pull request. I'm not sure if exposing the |
Contributor
Author
|
I took a closer look at Nevertheless, I still think that there is some value in my approach, because I think that local flutter = require("flutter-tools")
flutter.setup({ ... })
flutter.start()semantically makes a lot more sense than local flutter = require("flutter-tools")
flutter.setup({ ... })
flutter.setup_project({}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the visibility of the function
startinlua/flutter-tools.luafrom private to public.Currently, it is not possible to execute user commands from
flutter-tools(FlutterRun,FlutterDebug, ...) before a.dartor thepubspec.yamlfile has been entered. These commands can only be used once thestartfunction, which registers them, is called. The problem is, that instead of callingstartinsetup, it is called once a.dartor thepubspec.yamlfile is entered.This change allows the user to call
flutter.start()in theirinit.lua(or local.nvim.lua) file, to register all user commands. Therefore, the user is not required to enter a.dart/pubspec.yamlfile to run their app and view log messages.