Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Wrap with widget code action does not enter select mode

Đang mở
#426 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
dart, flutter, lua, neovim
Lĩnh vực
devtools, mobile-dev

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện code action Wrap with Widget trên đoạn mã Dart được cung cấp tại Placeholder, sau đó lần theo điểm vào của code action chịu trách nhiệm tạo tên widget. Issue được hoàn thành khi tên widget được tạo ra được chọn để thay thế, khớp với hành vi của snippet Stateless widget.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
2025-01-03-145301_sway-screenshot

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.
2025-01-03-145456_sway-screenshot

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

Ngôn ngữ chính
Lua
Star
1.4k
Fork
117
Merge trung bình
9 giờ 54 phút
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nvim-flutter/flutter-tools.nvim

Tất cả issue của nvim-flutter/flutter-tools.nvim

Issue tương tự

Thêm issue về Lua

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.