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

Allow using different flutter binaries for the sdk and flutter itself #260

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ using `lazy.nvim`
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
config = true,
}
```

Expand Down Expand Up @@ -177,11 +178,6 @@ such as `:FlutterRun --flavor <tasty>`, `:FlutterRun --no-sound-null-safety`.
## `FlutterOutline`

The outline window allows you to see the high level layout of the current buffer.
You can also apply code actions by pressing <kbd>a</kbd> on a widget. Then selecting
a code action and pressing <kbd>Enter</kbd>. Please note you have to wait very briefly for
the code action to be applied and the window to be updated.

![code_action_flutter](https://user-images.githubusercontent.com/22454918/127739980-04517ad2-679f-4f6c-bca4-4dd85372287b.gif)

### Full Configuration

Expand Down
12 changes: 5 additions & 7 deletions doc/flutter-tools.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*flutter-tools.txt* For Neovim >= 0.8.0 Last change: 2023 May 14
*flutter-tools.txt* For Neovim >= 0.8.0 Last change: 2023 July 06

==============================================================================
Table of Contents *flutter-tools-table-of-contents*
Expand Down Expand Up @@ -106,6 +106,7 @@ using `lazy.nvim`
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
config = true,
}
<

Expand Down Expand Up @@ -208,9 +209,7 @@ otherwise pass on the commandline such as `:FlutterRun --flavor <tasty>`,
FLUTTEROUTLINE *flutter-tools-usage-flutteroutline*

The outline window allows you to see the high level layout of the current
buffer. You can also apply code actions by pressing a on a widget. Then
selecting a code action and pressing Enter. Please note you have to wait very
briefly for the code action to be applied and the window to be updated.
buffer.


FULL CONFIGURATION ~
Expand Down Expand Up @@ -537,9 +536,8 @@ This will open your lsp logs. You can then check for any error messages.
6. *Outline window*: ./.github/outline.gif
7. *closing tags*: ./.github/closing_tags.png
8. *app_version*: https://user-images.githubusercontent.com/22454918/126676393-ad42019d-c56e-4cc7-b139-8e050e4861e8.png
9. *code_action_flutter*: https://user-images.githubusercontent.com/22454918/127739980-04517ad2-679f-4f6c-bca4-4dd85372287b.gif
10. *telescope picker*: https://user-images.githubusercontent.com/22454918/113897929-495a3e80-97c3-11eb-959f-9574319cd93c.png
11. *telescope fvm*: https://user-images.githubusercontent.com/35163478/137667084-98c00c4b-ff8c-4d1e-869e-d2d51cf86f7e.png
9. *telescope picker*: https://user-images.githubusercontent.com/22454918/113897929-495a3e80-97c3-11eb-959f-9574319cd93c.png
10. *telescope fvm*: https://user-images.githubusercontent.com/35163478/137667084-98c00c4b-ff8c-4d1e-869e-d2d51cf86f7e.png

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

Expand Down
3 changes: 2 additions & 1 deletion lua/flutter-tools/executable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ function M.get(callback)

if config.flutter_path then
local flutter_path = fn.resolve(config.flutter_path)
_paths = { flutter_bin = flutter_path, flutter_sdk = _flutter_sdk_root(flutter_path) }
local flutter_bin = config.flutter_bin or flutter_path
_paths = { flutter_bin = flutter_bin, flutter_sdk = _flutter_sdk_root(flutter_path) }
_paths.dart_sdk = _dart_sdk_root(_paths)
_paths.dart_bin = _flutter_sdk_dart_bin(_paths.flutter_sdk)
return callback(_paths)
Expand Down