deadfoxygrandpa / Elm.tmLanguage

Elm language syntax highlighting and tool integration for ST2/3
https://packagecontrol.io/packages/Elm%20Language%20Support
MIT License
122 stars 27 forks source link

highlighting problems (with identifiers including keywords) #4

Closed cognominal closed 10 years ago

cognominal commented 11 years ago

in https://github.com/evancz/elm-lang.org/blob/master/elm-docs/Search.elm The identifier moduleList is incorrectly highlighted and starting from there highlightig goes havoc. These may be two separate problems.

Thx for you module, btw.

deadfoxygrandpa commented 11 years ago

Oh, I think I see what the problem is. I'm not searching for word boundaries when matching the name "module" and if you type an invalid module name after that, it will highlight everything as invalid. I'm traveling at the moment, but I should be able to fix this soon after I get back.

Thanks!

deadfoxygrandpa commented 11 years ago

I got back from my trip and it was a pretty quick fix. I believe it's fixed now, anyway. Can you update and check again?

evancz commented 10 years ago

I think I am observing this behavior with module and with import.

screen shot 2014-08-14 at 2 45 17 pm

screen shot 2014-08-14 at 2 45 29 pm

I just started using this recently, so I'd be sort of surprised if I was on an old version. How do I check that though?

deadfoxygrandpa commented 10 years ago

Open the Sublime command palette and select Package Control: List Packages. You should Elm Language Support listed with a date underneath. What's the date you have written there?

The moduleName part should be fixed, but I think your importing example is a new one that I'll have to fix.

evancz commented 10 years ago

Here's my version:

screen shot 2014-08-14 at 4 54 57 pm

I'll try to figure out how to update and see if the module fix is there.

deadfoxygrandpa commented 10 years ago

No, I think there's something wrong on my end here. You're apparently running the same version as me, but I have the module fix and you don't. Let me try to figure out what's going on here.

evancz commented 10 years ago

Ah, I made a bad mistake! I am in a Haskell file! Sorry for the erroneous bug report :(

I opened up an Elm file and saw (1) that module is fine and (2) that import is still messed up.

evancz commented 10 years ago

Okay, now that I have switched to some Elm code, I'm seeing some issues that may have primed me to report to you for the module stuff. It looks like type gets highlighted when it's followed by a prime.

screen shot 2014-08-14 at 5 32 02 pm

evancz commented 10 years ago

I feel like it'd be best to close this issue and open individual ones that clearly describe the import and type issue. Would you like me to do that?

deadfoxygrandpa commented 10 years ago

Sure, go ahead.

deadfoxygrandpa commented 10 years ago

It makes sense that you were in a Haskell file, since this Elm syntax highlighting was originally a copy of the Haskell one that ships with Sublime Text 2, and some things like this were originally issues with the Haskell syntax highlighting.

deadfoxygrandpa commented 10 years ago

By the way @evancz: if you're writing Haskell in Sublime Text and are annoyed by this, you should install the SublimeHaskell plugin, which includes an alternate (better) syntax highlighting definition (among other features).

evancz commented 10 years ago

Just switched, thanks for the recommendation :)