akinsho / flutter-tools.nvim

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

[BUG] fvm not working on windows #343

Open Azkarell opened 3 months ago

Azkarell commented 3 months ago

Is there an existing issue for this?

Current Behavior

Running :FlutterRun with fvm enabled throws ENOENT: no such file or directory in windows grafik although path is detected correctly

Expected Behavior

Running :FlutterRun in windows should run flutter

Steps To Reproduce

my conifg with lazy: { 'akinsho/flutter-tools.nvim', lazy = false, dependencies = { 'nvim-lua/plenary.nvim' }, config = function() require('flutter-tools').setup { fvm = true, -- debugger = { -- enabled = true, -- run_via_dap = true, -- register_configurations = function(paths) -- local file = io.open('.vscode/launch.json', 'r') -- if file ~= nil then -- io.close(file) -- require('dap.ext.vscode').load_launchjs() -- end -- end, -- }, } require('telescope').load_extension 'flutter' end, },

Environment

- OS: Windows 11 Pro
- Flutter version: fvm mit flutter 3.13.9
- Is flutter in $PATH: yes
- neovim version: 0.9.5

Anything else?

I tried to find out what is happening and it might not even be the fault of this tool but i am quite new to neovim and just evaluating if i want to continue using it. what i found that just the line :lua =vim.uv.spawn("C:\\\fvm\versions\3.13.9\bin\flutter", { { "run" }}) already fails

just running "C:\\\fvm\versions\3.13.9\bin\flutter" in pwsh or cmd or even with Start-Process is working.

sidlatau commented 3 months ago

Does it work if you run fvm outside neovim: fvm flutter run?

Azkarell commented 2 months ago

yes everything works as expected outside of neovim. only this plugin/neovim can't start it.