-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 'flutter run' not compatible with 'open file' ? #391
Comments
Thank you for providing detailed information on the issue. The intention here is to keep the original behaviour because we do not want to modify the logs that we receive from the Flutter framework. The logs are generated directly by Flutter, and altering them could lead to inconsistencies or confusion, especially when debugging across different environments. Maintaining the full path as it is output by Flutter ensures we preserve the integrity of the log information. |
maybe there's a way to alter 'gf' in lua, to strip the base path |
You could try to use includeexpr. |
I see this plugin may be doing what you want: |
I am reopening this case, I added package resolve function based on what I found in https://github.com/dart-lang/dart-vim-plugin. @Dieterbe would it be possible for you to test it? If you are using lazy here is example setup to test: return {
"nvim-flutter/flutter-tools.nvim",
branch = "resolve-url",
....
} |
wow! accommodating the functionality in flutter-tools.nvim's lua code was actually the outcome i was hoping for, but i was not ready to do the work, and i didn't want to impose the burden on you. i'm excited that you decided to give this a shot, and it will be my pleasure to test it and provide my feedback. stay tuned! |
Is there an existing issue for this?
Current Behavior
i have a project in ~/code/ptc, therefore i run
nvim code/ptc
in my home directory.when i do FlutterRun, and i get an error, the console output is something like this:
normally, i should be able to hover over the filename - e.g. movements.dart - and hit 'gf' to go to the file, however, flutter run puts the 'ptc' part in the path, but vim is already inside the ptc directory, therefore it can't find the path.
the workaround is that a copy paste the output into a different buffer, remove the 'ptc/' and then 'gf' works as expected..
Expected Behavior
not sure. maybe flutter run shouldn't print the base directory of the project?
Steps To Reproduce
trigger a bug during execution and try to use 'gf' on the returned file.
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: