-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Elvish transcripts. #6302
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really don't need an extension or sample in this case and can simplify the entry (see inline comment).
Widespread usage is still a consideration which is quite easy to determine as you've stated this will only be used in markdown files or issue comments.
This search shows it is only being used in 135 markdown files so falls a little short on the files side.
Searching issue comments or bodies doesn't seem to indicate it's used that much with only 8 results.
So whilst there is usage, it doesn't appear widely adopted on GitHub yet, though I guess the lack of highlighting might have something to do with that in issues.
Let me sleep on this.
Co-authored-by: Colin Seymour <colin@github.com>
Thanks, applied your suggested change. Also regenerated vendor/README.md and removed the sample. I wonder though - how does Linguist know that the
I definitely agree that the lack of usage currently is because there's no syntax highlighting yet, so people don't bother. Looking at the first page of open issues in https://github.com/elves/elvish/issues, a lot of comments containing transcripts, but not using the |
Linguist doesn't directly handle the codeblocks, markup does, but markup uses the languages and grammars supplied by Linguist. I gave a brief run down of how this works just yesterday at #6293 (comment) but in short it knows because users tell it and thanks to the entry in the "The file/codeblock has been identified as 'Elvish Transcript', so Mr Syntax Highlighting Engine, please use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets go for it.
Awesome, thank you 🥳 |
This adds support for highlighting transcripts of Elvish sessions.
Description
Support for Elvish was accepted in #5940. Because Elvish is a shell language, it is very frequent to not show just Elvish code, but also its outputs. Instead of just:
echo foo
One often needs to show:
~> echo foo foo
These transcripts are most often used inside the Markdown of (for example) issue comments, and rarely saved to files, so there aren't a lot of those files on GitHub today.
However, my primary goal is to make it possible to use the
elvish-transcript
language tag on GitHub, and sinceelvish
is already usable as a language tag, I'd argue that it should be supported too. The notability test was passed when Elvish itself was accepted.I did define a file extension for Elvish transcripts,
.elvts
, but I am fine if I should drop that.Checklist:
.elvts
extension is not widely used, see above for explanation.echo
command (https://elv.sh/ref/builtin.html#echo, source)