Skip to content
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-tools in Lazy.nvim #345

Closed
1 task done
XNeyMo opened this issue Apr 15, 2024 · 6 comments
Closed
1 task done

[BUG] flutter-tools in Lazy.nvim #345

XNeyMo opened this issue Apr 15, 2024 · 6 comments

Comments

@XNeyMo
Copy link

XNeyMo commented Apr 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I followed the documentation in the README, however I am unable to use the commands in Flutter. I just copy and paste the code into the documentation, my init.lua is:

required('lazy').setup({
        ...
        {
                'akinsho/flutter-tools.nvim',
                lazy = false,
                dependencies = {
                        'nvim-lua/plenary.nvim',
                        'stevearc/dressing.nvim', -- optional for vim.ui.select
                },
                config = true,
        },

        'nvim-lua/plenary.nvim',
        'stevearc/dressing.nvim'
        ...
},

Expected Behavior

Be able to use Flutter commands

Steps To Reproduce

  1. In lazy.nvim, add flutter-tools.nvim
  2. Reload nvim to install flutter-tools
  3. Error with :FlutterRun (E492: Not and editor command: FlutterRun)

Environment

- OS: Arch Linux 6.8.5
- Flutter version: 3.19.5
- Is flutter in $PATH: yes
- neovim version: 0.9.5

Anything else?

No response

@JordanllHarper
Copy link
Contributor

JordanllHarper commented May 24, 2024

Might be useful posting your full lazy here, as there doesn't look to be anything wrong initially.
What happens if you replace your config with

config  = function() 
    require 'flutter-tools'.setup()
end

@JordanllHarper
Copy link
Contributor

Also just a thought, have you tried in a flutter project? Do you get the commands then?

@mbpowers
Copy link

your config works fine for me 🤔

@erlangparasu
Copy link

erlangparasu commented May 29, 2024

This lua config works for me:

Screenshot:

image

Source:

return {
    'akinsho/flutter-tools.nvim',
    lazy = true,
    ft = {
        "dart",
    },
    dependencies = {
        'nvim-lua/plenary.nvim',
        'stevearc/dressing.nvim' -- optional for vim.ui.select
    },
    config = true
}

@sidlatau
Copy link
Collaborator

sidlatau commented Jun 6, 2024

It looks like this is not a plugin issue, closing it.

@sidlatau sidlatau closed this as completed Jun 6, 2024
@hulk-higakijin
Copy link

I had the same issue, but running the FlutterRun command in a .dart file worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants