registering_file_type.md: hashbang

This commit is contained in:
Yann Cébron 2020-06-15 13:02:04 +02:00
parent 62b08d6641
commit b4595a23ec

View File

@ -4,7 +4,9 @@ title: Registering a File Type
<!-- Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
The first step in developing a custom language plugin is registering a file type associated with the language.
The IDE normally determines the type of a file by looking at its file name.
The IDE normally determines the type of a file by looking at its file name or extension.
In 2020.2, support for mapping via _hashbang_ is available via `hashBangs` attribute in `com.intellij.fileType` extension point.
A custom language file type is a class derived from
[`LanguageFileType`](upsource:///platform/core-api/src/com/intellij/openapi/fileTypes/LanguageFileType.java),