-
Notifications
You must be signed in to change notification settings - Fork 87
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] Wrap with widget code action does not enter select mode #426
Comments
I investigated a bit and found, that if capabilities.experimental = { snippetTextEdit = true } is provided, then {
command = {
arguments = { {
action = "dart.assist.flutter.wrap.generic"
} },
command = "dart.logAction",
title = "Log Action"
},
diagnostics = {},
edit = {
documentChanges = { {
edits = { {
insertTextFormat = 2,
newText = "${1:widget}(${2:child}: Text(context.l10n.internalNote))",
range = {
["end"] = {
character = 63,
line = 123
},
start = {
character = 32,
line = 123
}
}
} },
textDocument = {
uri = "file:///Users/ts/Documents/github/widget.dart",
version = 0
}
} }
},
kind = "refactor.flutter.wrap.generic",
title = "Wrap with widget..."
} That is how, I think, VSCode handles it. But I haven't found any easy way how to expand this snippet from code action. Neovim has some basic support for expanding snippets via |
Is there an existing issue for this?
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):
I have called the code action on the following snippet, at Placeholder
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: