The lack of context sensitivity
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 82k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
The major thing which prevents me from using FiraCode, or any other ligature-based programming font for that matter, is their lack of context-sensitivity. I spend a non-trivial amount of time doing text processing inside the shell and the ligatures tend to garble the output in subtle ways. Most problematic are the visually dissimilar ones (such as != rendering as ≠), which add another layer of mental overhead when reading the output rather than making things simpler. However, I do not think this is an unsurmountable issue:
- At the barest minimum, there should be terminal escape sequences for turning the ligatures on and off with the default being the off state. Editors like vim could then only switch the OpenType ligatures on, when they are running. I don't know if there already are such escape sequences (I would honestly be surprised, if there were), but I'm willing to look into this.
- After that, the next logical step is for the text editor to switch the ligatures on and off based on the language and the kind of tokens they appear in. This would prevent the ligatures from appearing inside string literals and plain text files.
- I don't even know whether OpenType has any support for multiple ligature sets or if it would be necessary to extend it, but making the editor switch between language-specific ligature sets based on the current language (rather than just a coarse-grained on- and off-switching) seems like the logical final step. After this step, I think we might just be quite close to a tangible and robust solution.
This is not really a feature request, but rather a discussion topic.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or implementation entry points are named. Start by investigating terminal escape sequences, editor-controlled ligature switching, and OpenType support for the proposed behavior; first establish which part is feasible and agree on a concrete scope before implementation. Done would require an accepted design and corresponding documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, vim
- Domain
- design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100