3

I'm working on a project(IntelliJ + Grav) which all base files are *.md, I have the need to just write HTML code in one of this MD files but I can find an option to change the syntax highlight or intellisense to trigger(emmet, tags, ...).

In VS Code you can change the language mode no matter which file extension you have open.

Q: Is there a way to make IntelliJ highlight HTML code in a MD file.

PS: Don't tell me to change the file extension or open the file in VS Code, as I'm currently doing it.

T04435
  • 12,507
  • 5
  • 54
  • 54
  • 1
    You can associate certain files with different types: https://www.jetbrains.com/help/idea/creating-and-registering-file-types.html. – CrazyCoder Apr 30 '18 at 02:24
  • @CrazyCoder I've added \* . \* to the HTML known type and it works. If you add the answer. I can mark you as the solution. – T04435 Apr 30 '18 at 03:09

1 Answers1

2

You can add the file name to the HTML file type list of files/extensions and IntelliJ IDEA will treat it as HTML file instead of Markdown file.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904