flutter-tools.nvim
flutter-tools.nvim copied to clipboard
[BUG] cmd Telescope flutter fvm not working
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
When executing the command
:Telescope flutter fvm
the following error occurs:
From what I found out and understood, this error happens because inside Neovim the fvm command is not recognized. However, if I have fvm installed with Scoop. All fvm commands in the Powershell work perfectly for me. Also, I have added the Flutter extension as indicated in the Flutter-Tools documentation for Telescope (the commands in this list work fine for me, and FlutterRun uses the sdk from the .fvm folder).
:Telescope flutter commands
Back to the problem, my configuration for Flutter-Tools is simply:
require(“flutter-tools”).setup {
fvm = true
}
Editing the Flutter-Tools code, I have discovered that if I put the full path to fvm.bat instead of leaving it as “fvm”, the command works again (but not as expected)
:Telescope flutter fvm
.../nvim-data/lazy/flutter-tools.nvim/lua/flutter-tools/commands.lua
View of what is obtained with this change:
If after that change the :Telescope flutter fvm command is “working” again, then why does it look like that?
Note: I tried to downgrade fvm thinking that in an older version the fvm list command can be displayed without table, but so far nothing. I guess fvm for linux does not have this view when running the fvm list command unlike Windows with Powershell.
Note: I also don't know if it is a problem with the table view of the fvm list command. I don't know if finding a version that shows it in a simpler way will solve the problem (although it would also be necessary to test it and verify that you can change the sdk version once the view issue is solved).
Note: Finally, if for Windows the view of the fvm list command is strictly with that form of table. I imagine that the code will have to be edited in such a way that only the name of the versions is retrieved or something similar. This so that when you run the :Telescope flutter fvm command you see the same as in the Flutter-Tools documentation.
Expected Behavior
When executing the command
:Telescope flutter fvm
You have to open this:
And of course, that you can select an sdk and when you run
:FlutterRun
The application is executed with the selected sdk.
Steps To Reproduce
- Environment:
- Config
require(“flutter-tools”).setup {
fvm = true
}
- Execute
:Telescope flutter fvm
- Error
Environment
- OS: Windows 11 Pro
- Flutter version (local): 3.7.0
- Flutter version (global): 3.24.3
- Is flutter in $PATH: Scoop Path -> C:\Users\abela\scoop\apps\fvm\current\default\bin\flutter.bat
- neovim version:0.10.0
Anything else?
No response