Giter Club home page Giter Club logo

Comments (23)

jianghaizhu avatar jianghaizhu commented on August 18, 2024 1

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.

sglyon avatar sglyon commented on August 18, 2024

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.

Libbum avatar Libbum commented on August 18, 2024

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.

sglyon avatar sglyon commented on August 18, 2024

So it seems to work for me in a julia file or other

screen shot 2015-10-30 at 11 57 42 am

from atom-language-julia.

Libbum avatar Libbum commented on August 18, 2024

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.

50Wliu avatar 50Wliu commented on August 18, 2024

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.

Libbum avatar Libbum commented on August 18, 2024

@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.

50Wliu avatar 50Wliu commented on August 18, 2024

What about the scope of <? Is it exactly the same as =?

from atom-language-julia.

Libbum avatar Libbum commented on August 18, 2024

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.

50Wliu avatar 50Wliu commented on August 18, 2024

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.

Libbum avatar Libbum commented on August 18, 2024

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.

cdsousa avatar cdsousa commented on August 18, 2024

I still miss ligatures on !==, ===, ++, --, and possible others. I tried to solve it but unsuccessfully...

from atom-language-julia.

jianghaizhu avatar jianghaizhu commented on August 18, 2024

@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.

Libbum avatar Libbum commented on August 18, 2024

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.

jianghaizhu avatar jianghaizhu commented on August 18, 2024

@Libbum No hurry. Happy birthday!

from atom-language-julia.

pfitzseb avatar pfitzseb commented on August 18, 2024

Which ligatures aren't working for you?

from atom-language-julia.

jianghaizhu avatar jianghaizhu commented on August 18, 2024

as mentioned above by @cdsousa

from atom-language-julia.

Libbum avatar Libbum commented on August 18, 2024

A few questions:

  1. Is anyone having troubles with ligatures other than !==, ===, ++ or --?
  2. 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.

sglyon avatar sglyon commented on August 18, 2024

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.

Libbum avatar Libbum commented on August 18, 2024

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.

sglyon avatar sglyon commented on August 18, 2024

Excellent, thanks again.

Also -- no rush (github missed the -- ligature 😏 )

from atom-language-julia.

jianghaizhu avatar jianghaizhu commented on August 18, 2024

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.

Libbum avatar Libbum commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.