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

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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