简体   繁体   中英

Syntax-Highlighting in Intellij - Custom Language

I am currently developing an Intellij-Plugin in Java for a custom language.

Is there any way, that I can easily and through my code register a file type and keywords for Syntax-Highlighting?

You can go into file > settings > editor > filetypes

  • Create new file name it however you like; say javascript custom fill in the keyword you want highlighted by group (1-4) ** note to have it work it you will have to essentially recreate the entire list (which isn't to difficult via internet search for a keyword list) Once your happy with the list simply add file name patterns on that file with a wild card *.js (this is the part that will use your custom file over the provided ** easy to go back/edit/delete your own file)

Here's an example I found online CSS Keyword list example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM