HAML syntax highlighting not working for 1 file.

Answered

I have a file where there is no syntax highlighting for HAML syntax.

I deleted the file and recreated it but it just won't highlight, it's extension is .html.haml just like all other files that do highlight.
I created it from: Rightmousebutton>new>File. Normally this enables syntax highlighting but it stopped doing so for this file.

i can create the file elsewhere in the project it will highlight properly but as soon as i move it to the target folder it breaks the highlighting. any other file i create within the same folder will properly highlight.

The icon is different as well with a properly HAML hightlighted file it has a red rectangle with an h in it, but the icon remains equal to the "new>File" icon.
Any advice?

5 comments
Comment actions Permalink

Hello,

could you please specify whether it always happens with the same file name or it doesn't depend on it? In case you create a file (with the same name) in 2 different folders will the behaviour differ?

0
Comment actions Permalink

Yes the behaviour differs, the one in the different folder does come with highlighting, in fact, renaming the file to anything other than the file i gave it solves the issue.

So i ended up renaming the partial with some characters.

The file name is `_bezoeken_fields.html.haml` not an incorrect name in my opinion.
renaming it to `_bezoeken_velden.html.haml`  solved the issue.

0
Comment actions Permalink

Could you please check that there's no such a pattern in Settings | File Types | Text?

0
Comment actions Permalink

That indeed was the issue, thank you dearly!

0
Comment actions Permalink

You're welcome, good to know it helped!

0

Please sign in to leave a comment.