racket / racket/gui

Parens and other delimiters should be more consistently handled in colorer

Open
#176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

This broader issue came up in the process of doing work for #162.

Notably, color:text<%> has a pairs field that contains matching paren symbols. However, the automatic parenthesis features of racket:text<%> act on double quotes and bars in addition to parens. With the current interface, this requires special case handling of double quotes and bars in the racket module. We should consider building additional support into the syntax colorer to allow more uniform implementation and flexibility in defining a #lang.

Additionally, the racket module maintains its own separate hard-coded list in racket-paren:get-paren-pairs. We should also analyze its uses and see whether/how corresponding functionality should be moved to the colorer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read gui-lib/framework/private/color.rkt, especially the pairs field in color:text<%>, and gui-lib/framework/private/racket.rkt, including racket-paren:get-paren-pairs. Trace how both modules handle parentheses, double quotes, and bars, then determine the required colorer interface changes. Done means the delimiter behavior is handled consistently without the current special cases and the affected uses are covered.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.