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

✨ Placeholder Support

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
swift
Lĩnh vực
desktop-dev, tooling

Hướng nghiên cứu

Không có tệp hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách lần theo các điểm tích hợp hiện tại của việc chỉnh sửa văn bản, tô sáng cú pháp và LSP, sau đó xác định nơi xử lý việc nhận diện, kết xuất, chỉnh sửa và điều hướng bằng Tab/Shift+Tab cho các placeholder. Công việc được xem là hoàn tất khi các placeholder có thể được phân biệt về mặt trực quan, chỉnh sửa, điều hướng và lồng nhau, đồng thời được phản ánh trong trạng thái của trình soạn thảo mà không làm hỏng tính năng tô sáng hiện có hoặc hành vi của LSP.

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

Mô tả

enhancement
Description

Implement support for placeholders in CodeEdit, similar to Xcode’s <#placeholder#> feature. This would allow developers to insert and cycle through editable placeholders in their code, improving productivity and code clarity during development.

Use Case

This feature would be particularly useful for defining temporary or template-like code constructs, such as:

let <#name#> = <#value#>

Placeholders would:

  1. Be highlighted visually.
  2. Be navigable (e.g., via Tab key).
  3. Allow inline editing to replace the placeholder text.
Expected Behavior
  • When a placeholder is inserted (e.g., <#placeholder#>), it should:
  • Appear visually distinct (e.g., highlighted with a subtle background color or outline).
  • Be editable directly in the code editor.
  • Allow navigation between placeholders using keyboard shortcuts like Tab and Shift+Tab.
  • Placeholders should support nested constructs (e.g., let <#name#> = <#type#>(<#arguments#>)).
Technical Notes
  • Integrate placeholder handling with the current text editing features.
  • Consider compatibility with existing syntax highlighting and LSP integration.
Steps to Implement
  1. Define a syntax for placeholders (e.g., <#placeholder#>).
  2. Update the text editor to recognize and render placeholders.
  3. Add keyboard navigation support for placeholders.
  4. Ensure placeholder edits are reflected in the editor state.
Additional Context

This feature would align CodeEdit with Xcode’s behavior, making it a more familiar and seamless experience for developers who work on macOS. It also complements other code editing enhancements, such as autocompletion and LSP support.

Screenshots
image
Ngôn ngữ chính
Swift
Star
720
Fork
162
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 CodeEditApp/CodeEditSourceEditor

Tất cả issue của CodeEditApp/CodeEditSourceEditor

Issue tương tự

Thêm issue về Swift

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.