AndrewUsher / AndrewUsher/obsidian-dynatrace-dql

Add query formatting and beautification options

Offen
#10 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Complex DQL queries can become hard to read when written on single lines or with inconsistent formatting. Adding formatting capabilities would improve readability and maintainability.

**Proposed Changes:**
- Add a command to format/beautify a DQL query with consistent indentation
- Auto-format on paste to normalize query structure
- Support configurable formatting preferences (indentation size, line width)
- Add bracket matching and auto-closing for query structures
- Normalize keyword casing (optional setting)

**Benefits:**
- Improves query readability, especially for complex multi-line queries
- Enforces consistent style across documentation
- Makes queries easier to review and maintain
- Reduces cognitive load when reading complex queries

**Related Code:**
The lexer in `src/dql-highlight.ts` provides token information that could be used to build a formatter. Commands are registered in `src/main.ts`.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reading the token information exposed by src/dql-highlight.ts and the command registration in src/main.ts. Define the scope and behavior for formatting, paste handling, configurable preferences, bracket support, and optional keyword casing; done means the agreed options are implemented and usable for complex DQL queries.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.