How to specify the type of the file in the file?

已回答

I created a DSL and gave the file the extension "workflow". When I try to edit it with Intellij the program asks me to install a plugin for files with the extension "workflow". But those files are something different, because my file uses just S-lists. How can I specify the correct type of my workflow-files?

Emacs searches for a pattern like "-*- mode -*-" in the beginning of the file. This is typically written in a comment. "mode" defines the type of the file. By this you can give the file the extension "workflow", although it uses Scheme syntax. Is there something similar available in Intellij?

0

Please see https://www.jetbrains.com/help/idea/creating-and-registering-file-types.html#create-new-file-type on how to configure custom file types.

If a file is correctly associated with a specific file type by its filename pattern, but you want to process this file differently, you can override the file type association for this file only as per https://www.jetbrains.com/help/idea/creating-and-registering-file-types.html#quickly-change-file-type 

If this is not what you need, please provide a small example showing the expected/actual result.

 

0

Found just "Override file type" in the context menu.

0

请先登录再写评论。