atuttle / atom-language-cfml

:space_invader: A CFML Language for the Atom Editor
38 stars 24 forks source link

Syntax Highlighting not working in CFCs #110

Closed kmac720 closed 6 years ago

kmac720 commented 6 years ago

I'm having an issue with syntax highlighting only working in .cfm files, but not in .cfc files. If I disable lanugage-cfml then the .cfcs immediately highlight properly, but .cfm files are then not highlighted.

amyers735 commented 6 years ago

I'm about to push a pull request for this - standby

On 14/02/2018 3:00 PM, kmac720 wrote:

I'm having an issue with syntax highlighting only working in .cfm files, but not in .cfc files. If I disable lanugage-cfml then the .cfcs immediately highlight properly.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atuttle/atom-language-cfml/issues/110, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHUqR-waA9dZ-olkY2Jzo9HVreNH9SPks5tUlpzgaJpZM4SEw5E.

kmac720 commented 6 years ago

Awesome, thank you!!

amyers735 commented 6 years ago

Unfortunately my pull request hasn’t resolved it. The workaround for the moment is downgrade Atom to 1.23.x

Further discussion of this in #109

kmac720 commented 6 years ago

Okay, thanks.

Miguel-F commented 6 years ago

I am experiencing this issue as well as the scrolling issue. On the scrolling issue, it will not allow you to scroll down beyond the current cursor position when using the mouse scroll wheel. Using the keyboard (page-up/page-down, arrows) does seem to work normally.

Miguel-F commented 6 years ago

@atuttle just FYI - this issue can be closed as well with the latest version release. #115 Thanks.

jinglesthula commented 6 years ago

On Atom 1.24.0 with 0.18.0 of this package I still see the issue (no highlighting in pure cfscript cfcs; works great in cfm and in cfcs that are CFML and have cfscript tags in them, though).

amyers735 commented 6 years ago

Have you restarted Atom to see if that helps? I did notice the same thing when I upgraded but it seemed to come right after a restart.

notronwest commented 6 years ago

I am still seeing the issue (Atom 1.24.0) - even after a restart

David-Polehonski commented 6 years ago

Hi, to help me out in fixing this can I have the following:

Also can you confirm that the issue is the syntax highlighting and not the autodetection? Try manually selecting cfscript and seeing if that triggers the highlighting/ and whether is successfully selects cfscript when opening an script based cfc in a new buffer/editor.

Many thanks in advance, once I have a reply I'll start working on a patch.

notronwest commented 6 years ago

Hi David,

Thank you for looking into this.

I am using Atom version 1.24.0, atom-language-cfml version 0.18.0 and I have attached a CFC that can be used to test the issue.

The problem seems to be with it not recognizing the CFC as a cfscript. When I select cfscript syntax the color coding appears. However, opening new cfc's does not trigger them to be recognized as cfscript.

Hope that helps.

On Mon, Feb 19, 2018 at 2:50 AM, David Polehonski notifications@github.com wrote:

Hi, to help me out in fixing this can I have the following:

  • Atom version
  • atom-language-cfml package version
  • An example cfc against which to test

Also can you confirm that the issue is the syntax highlighting and not the autodetection? Try manually selecting cfscript and seeing if that triggers the highlighting/ and whether is successfully selects cfscript when opening an script based cfc in a new buffer/editor.

Many thanks in advance, once I have a reply I'll start working on a patch.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atuttle/atom-language-cfml/issues/110#issuecomment-366653494, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmocA4-il-scTwTad_SWRvol3n37cT6ks5tWVHhgaJpZM4SEw5E .

David-Polehonski commented 6 years ago

Sorry to be a pain, but it seems that github hasn't accepted the attachment. I can review the code, but I'll need an example to be more specific.

amyers735 commented 6 years ago

I think you’ll need to attach the file from the GitHub web site - it looks like it won’t accept an attachment via email

-- Sent from Gmail Mobile

David-Polehonski commented 6 years ago

I did some testing on the loading of CFCs, there is a race condition which conflicts with the auto detection if the grammars complete loading before the modules grammar load event listener. I'm submitting a pull request to fix this and update the detection to a slightly lower latency script-first approach; it's easier to presume the cfc is script based unless the first line of non-zero length begins with a tag.

robertdmunn commented 6 years ago

I am seeing this issue as well. If anyone else needs a workaround until it is resolved, I think I found one. Disable the language-cfml package and quit Atom. Restart Atom, then enable the language-cfml package. Open a CFC and see if you get syntax highlighting. That seems to be working for me right now.

mafimo commented 6 years ago

Disable the language-cfml package and quit Atom. Restart Atom, then enable the language-cfml package.

doing this seemed to work for me

notronwest commented 6 years ago

That worked for me - thanks!

On Tue, Feb 20, 2018 at 9:26 AM, Robert Munn notifications@github.com wrote:

I am seeing this issue as well. If anyone else needs a workaround until it is resolved, I think I found one. Disable the language-cfml package and quit Atom. Restart Atom, then enable the language-cfml package. Open a CFC and see if you get syntax highlighting. That seems to be working for me right now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atuttle/atom-language-cfml/issues/110#issuecomment-367053046, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmocIjcK4PFLpRw8b6TMeKp5-dMArCcks5tWwA3gaJpZM4SEw5E .

jinglesthula commented 6 years ago

@robertdmunn or anyone else who's tried the workaround, can you get the problem to still happen after doing this ever? e.g. if it's a race condition, can it still affect files once in a while?

As an aside, the workaround worked for me as well :)

notronwest commented 6 years ago

The only thing I have seen is an Atom crash which caused the problem to occur again. Disabling and Re-enabling fixes it again.

On Fri, Feb 23, 2018 at 2:11 PM, jinglesthula notifications@github.com wrote:

@robertdmunn https://github.com/robertdmunn or anyone else who's tried the workaround, can you get the problem to still happen after doing this ever? e.g. if it's a race condition, can it still affect files once in a while?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atuttle/atom-language-cfml/issues/110#issuecomment-368153319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmocD7tqM-NHQz8G322j29sFQXBvk0rks5tXzengaJpZM4SEw5E .

robertdmunn commented 6 years ago

I just got it to happen again today. Not sure if it was a crash or what did it, but like @notronwest said, disabling, restarting and re-enabling fixes it again.

David-Polehonski commented 6 years ago

I've opened a second pull request, building on my first resolving this issue and a number of others. Hopefully one of them will be merged soon and resolve this.