Skip to content

Fix identifiers associated with plain-text - #8307

Merged
lildude merged 3 commits into
mainfrom
plain-text-scope
Nov 4, 2026
Merged

lildude merged 3 commits into
mainfrom
plain-text-scope

Conversation

@Alhadis

@Alhadis Alhadis commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Description

I noticed that in e252a56 (as part of #4623), the text.plain scope somehow slipped into grammars.yml underneath ‎vendor/grammars/atom-editorconfig‎, despite that submodule never once including a grammar with the text.plain scope in its history (as it would have shadowed Atom's built-in text.plain grammar, which it inherited from TextMate's Text.tmBundle).

There's also no such grammar defined with that scope used anywhere in Linguist, for the simple reason that the trivial highlighting provided by TextMate's "Plain Text" syntax wouldn't show up on GitHub given the latter's restrictive scope-highlighting, and would probably distract readers if it did.

This pull-request removes the spurious inclusion, whilst also defining a CodeMirror MIME type for the Linguist's Text language (which CodeMirror curiously defines without an accompanying editor mode). I'm not sure how or if this is of benefit to folks running CodeMirror, but for the sake of completeness, I decided to add it to Text anyway while I was checking that its tm_scope field didn't reference text.plain anywhere.

(Checklist omitted since it doesn't apply).

This was added in e252a56 as part of a mass-update to grammar submodules
and their cached license files, a typical preparatory pre-release phase.
It's unclear how this scope made it into `grammars.yml`, as the relevant
grammar (atom-editorconfig) has only ever included the one grammar, with
no references made to the `text.plain` scope.
Unlike other supported CodeMirror languages, plain-text defines no mode:
https://github.com/codemirror/codemirror5/blob/9b4f060/mode/meta.js#L107
@Alhadis
Alhadis requested a review from a team as a code owner November 4, 2026 14:52
@Alhadis
Alhadis requested a review from lildude November 4, 2026 15:07
@lildude
lildude added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit d456527 Nov 4, 2026
11 checks passed
@lildude
lildude deleted the plain-text-scope branch November 4, 2026 16:30
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.

2 participants