Wrong file type for single .less file

I wanted to create a new .less file with PhpStorm named content.less, but I forgot the file type, so I just typed "content". The file had no type and I noticed my error, so I deleted it. Then I created a new file named "content.less" but PhpStorm still doesn't recognize the file type. Even deleting the file and creating it again doesn't make PhpStorm recognize it correctly as .less file. I even created a .txt file with Windows and renamed it to "content.less" but PhpStorm refused to recognize the file as .less file. All other files work as they should.

(I disabled file endings in tabs, thats why there is no ending shown)

phpstorm_bug_01.png

2 comments
Comment actions Permalink

Hi there,

Settings | File Types | Text files

Find and delete problematic pattern there (bottom list) -- it should be "content" or something similar

P.S.
To avoid such error in the future (especially if you create .less files often) consider creating separate file template (Settings | File and Code Templates) -- at very least IDE will take care of adding extension to the file name automatically.

2
Comment actions Permalink

Thanks, that did the trick.

0

Please sign in to leave a comment.