Comments (23)
I still have the ligature rendering problem. I am using Atom 1.9.2, font "Hasklig". Only a few ligatures, like "->", are working. And most of them don't.
from atom-language-julia.
This is very strange.
I don't expect our syntax highlighting to change anything. We are just supplying the highlighting engine with a set of regular expressions that tell Atom how to highlight each character -- not how they should be displayed.
Sorry I don't have anything more constructive to say here... I'm just puzzled
from atom-language-julia.
I totally agree!
It may actually be something else and not the syntax highlighter at all. But I don't know enough about how the ligature support works under the hood. If anyone can suggest some more troubleshooting steps for me to investigate to try and rule out any involvement of this package that'd be great!
from atom-language-julia.
So it seems to work for me in a julia file or other
from atom-language-julia.
OK cool. I'm going to disable everything and turn on packages one at a time.
Edit: Base install, default everything apart from
atom-text-editor {
text-rendering: optimizeLegibility;
}
in style.less
, the font name in the settings panel and this package installed and the issue still exists.
I'm using Arch Linux, atom has been built from this package on the AUR if that makes any difference.
from atom-language-julia.
This happens if the tokenization changes between the characters; eg if the !
and =
have different tokens associated to them. You might want to check if that's happening.
from atom-language-julia.
@50Wliu, thanks for the tip. Since it seems I'm the only one with this issue, can you give me a bit more detail on how I'd check this? I'm quite new to atom development.
The only new thing I can add is that I've checked the scopes applied at the cursor position between a ligature. If I denote the cursor position with |, then checking (for example) <|= gives me source.julia, keyword.operator.update.julia
with a julia file, and similar keyword.operator.* scopes for other languages such as haskell and chapel. The only visual differences of the latter two is they actually give me ligatures. The thing I can see that's causing this problem is that <=
should be in the relation.julia scope, but it isn't listed as that here.
from atom-language-julia.
What about the scope of <
? Is it exactly the same as =
?
from atom-language-julia.
Ahh, no they aren't. <
is keyword.operator.relation.julia
and =
is keyword.operator.update.julia
. Can someone who isn't getting this error check to see their scopes for these two?
from atom-language-julia.
Ok. Here's the problem: https://github.com/JuliaLang/atom-language-julia/blob/master/grammars/julia.cson#L239
<=
and >=
have to be matched before <
and >
, respectively.
from atom-language-julia.
Excellent! That fixed <=
and =>
. I'll take a look at some more fixes (for example !=
) of similar nature and create a pull request.
from atom-language-julia.
I still miss ligatures on !==
, ===
, ++
, --
, and possible others. I tried to solve it but unsuccessfully...
from atom-language-julia.
@Libbum It seems like many people, including me, still have problems with ligature. Is it working for you?
@spencerlyon2 maybe this issue can be reopened?
from atom-language-julia.
I haven't been using Julia for a while, so can't say for sure. It's my birthday weekend so I'm out, but will take a look soon at the issues presented above.
from atom-language-julia.
@Libbum No hurry. Happy birthday!
from atom-language-julia.
Which ligatures aren't working for you?
from atom-language-julia.
as mentioned above by @cdsousa
from atom-language-julia.
A few questions:
- Is anyone having troubles with ligatures other than
!==
,===
,++
or--
? - Are all of you using Hasklig?
I'm using PragmataPro, (but I'm also now checking against Hasklig). I see a few issues for us here, considering that ligature support on both fonts do not cover the complete Julia scope.
For example, afaik, Hasklig has not implemented --
or >=
for that matter. (see currently implemented ligatures)
I have PragmataPro working with --
though, but that font is yet to implement ==
or ===
.
I have a working patch for the four mentioned ligatures above, that should automatically work if coverage in the fonts are updated in a future version, but until then we can't do much more. If anyone has any more ligatures they think we've missed, let me know and I'll take a look. Otherwise I can send this PR through and we can close the issue again for now.
from atom-language-julia.
Thanks for checking in this @Libbum. I'd be happy to accept a PR that preps us for whenever fonts implement the ligatures we might find in valid Julia code.
from atom-language-julia.
Alright. Give me a bit of time to check that I have full coverage of that. I'll validate against the Operator Precedence section of the manual.
from atom-language-julia.
Excellent, thanks again.
Also -- no rush (github missed the -- ligature 😏 )
from atom-language-julia.
Yes. Lacking of >=
and <=
in Hasklig is really inconvenient. That is why I am switching toFira Code
, which I consider has the most ligatures implemented. By the way, is there a list of all Julia operators that we can use to test the ligatures?
from atom-language-julia.
Have any of you came across problems with my changes? If everyone is happy with the improvements Spencer and I are ready to merge this soon.
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.