✨ Highlight Matching Tags

Aperta
#274 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
swift
Ambito
devtools

Direzione di ricerca

La issue non indica file, test o punti di ingresso. Per prima cosa individua i componenti dell’editor responsabili del parsing dei tag, della corrispondenza del cursore, dell’evidenziazione e della sincronizzazione delle modifiche; il lavoro è completo quando i tag di apertura e chiusura corrispondenti vengono evidenziati per le posizioni del cursore descritte e rimangono sincronizzati mentre si modificano i nomi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Description

We want to enhance tag-matching behavior in markup languages such as HTML, XML, and JSX by highlighting matching tags based on cursor position. This feature is inspired by bracket matching in Xcode, where matching brackets are highlighted based on cursor placement.

When the cursor is placed within a tag, the corresponding opening or closing tag should be highlighted. Additionally, if any tag name is modified in either the beginning or end tag, the matching tag should update to reflect the change.

Behavior Examples

In the following examples, | represents the cursor position, and underlined text represents the highlighted matching tags:

  • <|div class="wrapper">Hello world!</div>
  • <div| class="wrapper">Hello world!</div>
  • <div class="wrapper">|Hello world!</div>
  • <div class="wrapper">Hello world!<|/div>
  • <div class="wrapper">Hello world!</div|>
  • <div class="wrapper">Hello world!</div>|
Requirements
  1. Cursor-Based Tag Matching:

    • When the cursor is within a tag name, either at the opening or closing tag, the corresponding tag should be highlighted.
  2. Tag Synchronization:

    • When a tag name is edited, the matching tag should update to reflect the change in real-time, ensuring that both tags are always in sync.
  3. Highlight Behavior:

    • Highlighting should clearly indicate the matching tag, using a distinct visual style (e.g., underline or color change) for both the opening and closing tags to enhance visibility.

This feature will improve the editing experience by making it easier to identify matching tags, reducing errors in nested or complex structures.

Original Issue Description

Is it possible to highlight the opening and closing tags? Example: <div> </div>

Lingua principale
Swift
Stelle
720
Fork
162
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodeEditApp/CodeEditSourceEditor

Tutte le issue di CodeEditApp/CodeEditSourceEditor

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.