Comments (10)
These fixes would be great.
Re: improving highlighting generally, I have a PR with comprehensive improvements that I'm pretty excited about, but they're languishing locally until a parsing bug is fixed upstream: atom/first-mate#52. I don't know if anyone has done any work on first-mate -- hopefully it's fixed soon.
from atom-language-julia.
@garborg, really looking forward to your improvements. I think a solid cleanup would be great. Most of what is there right now is just inherited from the textmate bundle. We've made a few changes, but not a general overhaul like I think you are working on.
from atom-language-julia.
@one-more-minute I think you can just put a space between the _
and )
to fix the italic issue. I just tested and it looks like that would fix the docstring not ending issue also.
This also seems like more of a problem in the atom-gfm grammar since it only happens when we include
their grammar (i.e. only happens in a docstring)
from atom-language-julia.
@garborg any update on this? I see that very little has happened over at atom/first-mate, but are some of your improvements independent of that?
from atom-language-julia.
Oh and @one-more-minute, I currently have this in my styles.less
atom-text-editor::shadow {
.string.docstring.julia {
color: @syntax-result-marker-color;
}
}
It makes it more or less the same color as comments, depending on how the syntax uses that variable. It would be better to somehow pop the string scope when we enter a docstring though
from atom-language-julia.
The issue in atom/first-mate has been switched from 'bug' to 'matches macromates', which I imagine means won't fix. So dead end there until Atom supports more powerful tokenizers -- there are links in atom/first-mate#52 to issues suggesting supporting external tokenizers and/or Sublime 3's grammar.
Unfortunately, my plan to highlight almost everything correctly falls apart with a grammar that ignores 'end' patterns, so much of what I did will be useless. I do have plenty of new tests that should pass, but it'll take a bit of work to try to salvage actual changes.
from atom-language-julia.
Darn, that's disappointing.
I was looking forward to sane/complete scoping for everything.
from atom-language-julia.
The markdown specification used by language-gfm
is that an italic string is started by an italic delimiter (_
or *
) followed by anything that is not a space.
The following code works well:
"""
@switch `isa(x, _)` begin
Integer; "x is an integer!"
FloatingPoint; "x is a float!"
"x is something else!"
end
Where `_` is replaced by the value for testing in each case. The final
"""
macro switch(args...)
from atom-language-julia.
This is the same as atom/language-gfm#44, btw.
from atom-language-julia.
Fixed on master.
from atom-language-julia.
Related Issues (20)
- `′` breaks variable syntax highlighting
- md"a" syntax breaks highlighting
- Tokenize TODO in comments HOT 3
- Make more specific token for `::` HOT 4
- Weird case of function tokenization when end of line comment includes parentheses HOT 1
- colored documentation syntax as comment HOT 1
- Highlight attributes of a module or constructor HOT 4
- `Markdown.@md_str` breaks syntax highlighting HOT 8
- Incorrect syntax highlighting when splatting a range
- Unicode operators aren't highlighted HOT 1
- Additional keywords HOT 1
- String interpolation with generator is broken HOT 3
- Unicode letters break type name HOT 1
- Command interpolation
- Syntax coloring for doctests
- New `public` keyword not recognized
- Future development after Atom's sunset HOT 1
- Tokenization of commas changed to `source.julia`, which affects Julia Color Themes HOT 8
- Broken REPL syntax highlighting of multi-line inputs
- Highlight prompts in REPL syntax highlighting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-language-julia.