Giter Club home page Giter Club logo

Comments (10)

garborg avatar garborg commented on August 18, 2024

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.

sglyon avatar sglyon commented on August 18, 2024

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

sglyon avatar sglyon commented on August 18, 2024

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

sglyon avatar sglyon commented on August 18, 2024

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

sglyon avatar sglyon commented on August 18, 2024

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.

garborg avatar garborg commented on August 18, 2024

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.

sglyon avatar sglyon commented on August 18, 2024

Darn, that's disappointing.

I was looking forward to sane/complete scoping for everything.

from atom-language-julia.

tpoisot avatar tpoisot commented on August 18, 2024

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.

pfitzseb avatar pfitzseb commented on August 18, 2024

This is the same as atom/language-gfm#44, btw.

from atom-language-julia.

pfitzseb avatar pfitzseb commented on August 18, 2024

Fixed on master.

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.