Languages and files tab in the Editor section of the Preferences dialog allows customizing how syntax highlighting language and editing options are chosen depending on the document filename, as well as setting editing options for all documents which use given language and choosing file patterns and mime types for which the given language should be used.