[BUG] Wrap with widget code action does not enter select mode
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- devtools, mobile-dev
Research direction
Start by reproducing the Wrap with Widget code action on the provided Dart snippet at Placeholder, then trace the code-action entry point responsible for creating the widget name. The issue is done when the generated widget name is selected for replacement, matching the Stateless widget snippet behavior.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When using the 'Wrap with Widget' code action, a widget called "widget" is created. The cursor stays in the middle of the name and the placeholder is not selected.
Expected Behavior
It should enter select mode, allowing to select a widget. For example, when using the "Stateless widget" snippet, it creates a class called "MyWidget" and selects the name of the class. Entering text erases the placeholder.
It could also brind up a popup or query, for example as when renaming a variable.
Steps To Reproduce
I am using the following config (lazy.nvim):
{
"nvim-flutter/flutter-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"stevearc/dressing.nvim"
},
config = function ()
local map = vim.keymap.set
map("n", "fR", "<cmd> FlutterRun <cr>")
map("n", "fd", "<cmd> FlutterDevices <cr>")
map("n", "fr", "<cmd> FlutterRestart <cr>")
map("n", "fo", "<cmd> FlutterOutlineToggle <cr>")
require("flutter-tools").setup {
flutter_lookup_cmd = "asdf where flutter",
widget_guides = {
enabled = true,
}
}
end,
ft = "dart"
},
I have called the code action on the following snippet, at Placeholder
Widget test() {
return Placeholder()
}
Environment
- OS:Fedora 40
- Flutter version: tested on
- 3.19.5
- 3.19.6
- 3.22.0
- 3.22.2
- 3.24.3
- 3.24.4
- Is flutter in $PATH: yes
- neovim version: 0.10.2
Anything else?
No response
- Dominant language
- Lua
- Stars
- 1.4k
- Forks
- 117
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-flutter/flutter-tools.nvim
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
nvim-flutter/flutter-tools.nvim#524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvim-flutter/flutter-tools.nvim#393 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in nvim-flutter/flutter-tools.nvim
Similar issues
-
severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
luainkernel/lunatik#1853 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Operation Enhancement]: .editorconfigと.gitattributesでdictionaryとLuaファイルの編集・改行設定を統一するPossibly taken @5kdn claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 80/100
5kdn/DCS-Translation-Japanese#163 ·
Maintainers usually reply within 1 day