blvz / language-livescript-edge

LiveScript support in Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

\text fomatting a bit wierd

heavyk opened this issue Β· comments

commented

I switched to your repo from the other livescript one, and I have this issue. have you seen it before?

it doesn't highlight the last letter

screen shot 2015-07-21 at 19 47 52

Yup. Then I've made a "fix" that actually made things worse. See: 89b77ab and #2.

But in 1.0.1, with @gabeio's PR, things seem to work fine. See:
screen shot 2015-07-21 at 8 36 34 pm

Maybe it's an issue with the themes? I'm using One Dark for both. Can you please check it?

commented

yes, I see you've made an update. I will look. it appears I made the issue about 15 mins after your update..

get back to you in a moment :) cheers

commented

well the good news is it appears to be the theme. the bad news is, I like my theme a lot.

I'm using "Duotone Dark"

commented

so it appears that it's the same with both themes...

with one dark:
screen shot 2015-07-22 at 02 23 22

with duotone dark
screen shot 2015-07-22 at 02 23 51

oh yeah that was the issue but I'm ~99% sure it was there prior to 1.0.1 😒, I'll see if I can figure that one out too πŸ˜ƒ...

I forgot that was the issue because I actually hat that backslash feature LOL it's hurt me more than help so I stopped using it...

WOW I forgot how horrible this regex they use is it's not like any other regex >.> it's so WEIRD...

commented

backslash the best feature ever! what are you talking about... lol

for work, I write in normal javascript. I'm tellin ya, it's always a pleasure to get back to livescript and not have to put quotes everywhere.

LOLz yeah, I had a look and decided it was too insane, so I'm trying to temporary fix it rigth now in styles.less

@blvz @heavyk actually I think that is correct... I think the issue is the theme is too old/livescript doesn't technically have an ending punctuation... so the theme is thinking "asdf" but because we write it \asdf f it thinks is "... which works with normal javascript and most other languages...


you may have to mod the theme just for livescript ROFL


I am going to keep looking into this I really can't believe atom doesn't have a way to say there is technically no ending punctuation to something...

commented

I'm looking at the regex right now and I see the problem.

the regex assumes it's a string. it needs quotes to be seen that way...
screen shot 2015-07-22 at 02 54 59

see how the string begin and end are the quote marks? this will need to be something like a keyword instead...

@heavyk @gabeio I can't test it right now, but does Duotone have different colors for quotes? If so, I don't think there's a problem with the regex.

And I don't know if you know, but regexes in Atom/tmbundles are Oniguruma based. Knowing that, makes things slightly less painful.

yeah it does have different color quotes... but I am trying to see if there is a way to tell atom that is just the end of the string and not a quote...

commented

maybe something like this will work...

{
    match: "\\\\([\\\\)\\s,\\};\\]])?(?!$)[\\w-]*"
    name: "string.quoted.single.livescript"
  }

I tried it, but I don't know how to get the editor to update the parser... gonna read atom dev shit real quick. first time doing this

ctrl+alt+cmd+L refreshes the "browser"

commented

NAILED IT!
screen shot 2015-07-22 at 03 06 38

nice! pr πŸ‘ πŸ˜„

commented

it's the pattern I said above. I also had to start in "dev mode" apparently

cheers guys!!!

@gabeio have a look at the pattern because I don't think it's 100%

commented

I just don't know much about regex to follow along well. some of these regex hurt my head. gonna try a few things like like terminating backslash (in the other issue) and stuff before I make a pr

@heavyk Awesome! I was skeptical about it. πŸ‘πŸ‘πŸ‘

Looking at the inspector, things seem okay. Does it work on both themes?

Submit a PR for us to test it too. Then you can add changes if need it. πŸ‘

commented

it does indeed work in both :) put up a PR in a sec. give me a moment

btw I discovered another bug...

screen shot 2015-07-22 at 03 14 14

look at the ( after log. see how it's not a round brace?

lol wth I think I see another issue LOL notice the left ( isn't getting marked...

commented

yeah :) you wanna take that one? lol

lol my head still hurts from the first one & you fixed it so fast ;]

@heavyk Nice!

Well, as you find bugs, just open issues and when some of us get the time, we fix them. Or at least they are publicly known. I'll give it a shot when I get home, in about an hour.

commented

alright, I'll have a look at it tomorrow. this is kinda fun...

--- btw is there like a special procedure to forking in atom or is it the same thing: fork, clone, npm i, hack, git add remote, push ???

I'm still new to atom (a week now) so this is fun. I'm gonna just paste the change in github right now then I'll read up on it tomorrow. I'm going to bed here soon. it's 3:30 here

commented

done. I'm VERY satisfied with the result. turned out to be easier than I imagined.

#4

cheers guys. looking forward to do this again :)

good night

@heavyk it's basically that, but you can use apm to make things a little easier. Check the 3rd and 5th comments, here: https://discuss.atom.io/t/load-developing-package/2554

commented

oh that is very helpful! thank you... I'm really liking atom more and more. they advertized "a hackable editor" and I kinda balked at that but honestly I haven't opened sublime since atom.

likely you will see more contributions from me. this is amazing. btw, I was looking at the api: using decorations and markers, I think we could potentially use the LS AST to do perfect highlighting. I'm gonna let that idea swim around in my head a bit first, but I like the sound of it :)

cheers