-
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 Julia REPL #6859
Add Julia REPL #6859
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.
This approach is good and similar to what was done in #6302 for Elvish transcripts.
You're also going to need to update the grammars README.md (the test will fail if you don't).
The test failure says:
Should I add |
Top of that file has your answer 😉 linguist/lib/linguist/languages.yml Lines 9 to 11 in e2012cd
|
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.
LGTM. Thanks.
Note: this PR will not be merged until close to when the next release is made. See here for more details.
Awesome! Thanks for the guidance. :) |
Now online #6870 (comment)! 🥳 n = 1
foo(x) = 2*x
foo(n) julia> n = 1
1
julia> foo(x) = 2*x
foo (generic function with 1 method)
julia> foo(n)
2 |
This is a draft PR to add syntax highlighting to the Julia REPL mode
julia-repl
.What is it?
The Julia programming language has an interactive read–eval–print loop (REPL) that requires custom syntax highlighting. Julia's documentation tools distinguish between
julia-repl
andjulia
code blocks for markdown syntax highlighting.Julia Code vs. Julia REPL. Note the green
julia>
prompt and output:Example of Julia REPL syntax highlighting in the Julia documentation:
Why is it needed?
Since the REPL is used to install and demonstrate packages,
julia-repl
code blocks are widely used in GitHub READMEs, as seen in the 560 results here. Outside of READMEs,julia-repl
is used more than 10.000 times in code.However, GitHub doesn't recognize
julia-repl
markdown code blocks, onlyjulia
.julia
codeblock:julia-repl
codeblock:Description
Interestingly, a Julia REPL grammar already exists in linguist as
julia.console
:grammars.yml
julia-console.cson
I wasn't sure on how to add this to
languages.yml
, since the Julia REPL mode isn't a programming language by itself and therefore doesn't have a custom file type.I would love to get some guidance on how to get
julia-repl
markdown blocks working on GitHub.Checklist:
julia-repl
is used in 560 READMEs: https://github.com/search?type=code&q=path%3AREADME.md+%60%60%60julia-repljulia-repl
is used more than 10.000 times in code: https://github.com/search?type=code&q=%60%60%60julia-repljulia-repl
doesn't have a custom file typejulia.console
grammars.yml
julia-console.cson
#a270ba