Skip to content

fix(editor): stop flagging straight quotes and resolve every upstream language - #20

Merged
Yan123-tech merged 2 commits into
mainfrom
fix/editor-warn-chars
Oct 10, 2026
Merged

Yan123-tech merged 2 commits into
mainfrom
fix/editor-warn-chars

Conversation

@Yan123-tech

Copy link
Copy Markdown
Owner

Closes #19

What

Warning characters (UI): removed straight " and ' from CodeEditorView.warningCharacters. Straight quotes are correct in code — flagging them painted every string literal in every language with a warning background. Smart quotes, NBSP and ZWSP remain flagged.

Language coverage (Core): Language grew from 12 to 34 statics, one per grammar CodeEditLanguages actually ships (42 TreeSitterLanguage cases; jsdoc/markdownInline/regex/ocaml/agda/goMod deliberately not exposed). Identifiers now match TreeSitterLanguage.rawValue exactly — bash, plainText, cSharp — so CodeLanguage.editorLanguage (the reverse map) works. .tsx is its own language; .m/.mm belong to objc only; html += xml, text += cfg/conf.

Also: public Language.allLanguages is now the single ordered list used by both language(for:) and the UI bridge.

Verification

  • swift build — passes (one pre-existing unused-variable warning in EditorState.swift, unrelated)
  • swift test — 73 tests / 17 suites pass, including the updated Language.fromExtension (app.tsx → .tsx)
  • swift-format lint --recursive --strict — clean
  • CI checks format/syntax only; it does not build this package (MEMORY Wire LSPClient into SourceEditor via a TextViewCoordinator #1)

yan added 2 commits October 10, 2026 17:14
…d "'" from warningCharacters set, added doc comment explaining straight quotes are correct in code
…age enum from 12 to 34 statics matching upstream TreeSitterLanguage (42 cases); fixed identifier mismatches shell→"bash", plaintext→"plainText", csharp→"cSharp"; split .tsx from .typescript; added Language.allLanguages public static; updated language(for:) and bridge alias; updated test expectation app.tsx→.tsx; MEMORY entry #19 referenced
@Yan123-tech
Yan123-tech merged commit 748e7ef into main Oct 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor flags straight quotes as warnings and only 12 of 42 upstream languages are resolvable

1 participant