✨ Placeholder Support
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- swift
- 領域
- desktop-dev, tooling
研究方向
未指定檔案或測試。首先追蹤目前的文字編輯、語法醒目提示和 LSP 整合點,接著確定預留位置的辨識、呈現、編輯,以及使用 Tab/Shift+Tab 導覽應該放在哪裡。完成的標準是:預留位置在視覺上具有區別、可編輯、可導覽、可巢狀,並反映在編輯器狀態中,同時不破壞現有的醒目提示或 LSP 行為。
由索引模型根據 Issue 內容生成。
描述
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:
- Be highlighted visually.
- Be navigable (e.g., via Tab key).
- 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
- Define a syntax for placeholders (e.g.,
<#placeholder#>). - Update the text editor to recognize and render placeholders.
- Add keyboard navigation support for placeholders.
- 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
- 主要語言
- Swift
- 星號
- 720
- 分支
- 162
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodeEditApp/CodeEditSourceEditor 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 則留言 ·
-
難度 1/5 1-3 小時 新手友好度 68/100
-
難度 3/5 1-2 天 新手友好度 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 32/100
查看 CodeEditApp/CodeEditSourceEditor 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
googleapis/google-cloud-swift#1106 ·
-
bug channel: beta feature: preferences feature: ui/ux
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 1/5 1 小時以內 新手友好度 85/100
-
enhancement
難度 2/5 1-3 小時 新手友好度 75/100
Cocoanetics/SwiftACP#52 ·