akinsho / flutter-tools.nvim

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

[BUG] flutter command not found in nvim #279

Closed achrip closed 10 months ago

achrip commented 10 months ago

Is there an existing issue for this?

Current Behavior

the plugins works exceptionally for the most part. The weird thing is that Neovim doesn't seem to recognize the commands from this plugin. But if I use the command :Telescope flutter commands it shows me the list of commands and all runs well. Any suggestions?

neovim v.0.9.0

this is my .config/nvim file tree image

this is the flutter-tools.lua, but this file doesn't seem to do anything image

Expected Behavior

I should be able to run the :Flutter command

Steps To Reproduce

  1. with Packer.nvim, add the plugin for flutter-tools.nvim
  2. :so then :PackerSync
  3. see error when trying to run :FlutterRun and other flutter commands with exception E492: Not and editor command: FlutterRun

Environment

- OS: Ubuntu LTS 22.04.3
- Flutter version: 3.10.6
- Is flutter in $PATH: yes (installed via snap)
- neovim version: 0.9.0

Anything else?

No response

akinsho commented 10 months ago

@achrip the plugin only lazily loads itself inside of dart files. Can you confirm you've checked this inside of a dart file

achrip commented 10 months ago

oh I get it... Seems like I've missed that one detail when trying the plugin. Thanks a lot for the help!

I've confirmed the commands run perfectly when executed inside a .dart file. image