File Type Associations
Set up IDE file type associations to enable syntax highlighting and autocompletion for CLI file types.
Read time 3 minutesLast updated 21 hours ago
When a file is opened in an IDE, the IDE chooses the language service to use according to the file's type. When a file's type doesn't match any association in the IDE, no syntax highlighting or code analysis is provided.
Benefits of file type associations
By setting file type associations, IDEs become able to offer syntax highlighting and code analysis for a given file type. Additionally, for some CLI file types, schemas are provided. Those offer autocompletion. For example, Economy has multiple file types (.ecc, .ecr, .ecv, .eci), all of which are populated with JSON content. By associating the Economy file types.ecc.ecr.ecv.eciJSONSetting up file type associations
Rider
- Go to Settings/Preferences > Editor > File Types
- Select a language service (this is the language service that will provide syntax highlighting and code analysis for the file type, see examples)
- Enter a file name pattern (ex: inputting *.ecc will make it so any file that has the extension will adhere to the language service provided, see examples)
.ecc - Save
Visual Studio Code
- Go to Settings > Text Editor > Files
- Under "associations", click "Add Item"
- As key, enter a file name pattern (ex: inputting *.ecc will make it so any file that has the extension will adhere to the language service provided, see examples)
.ecc - As value, enter a language service (this is the language service that will provide syntax highlighting and code analysis for the file type, see examples)
- Click "Ok"
Visual Studio
- Go to Tools > Options > Text Editor > Extensions
- In the extension box, enter the desired file extension without * (ex: inputting .ecc will make it so any file that has the extension will adhere to the language service provided, see examples)
.ecc - Under the Editor dropdown, choose which language service to use for that file extension (this is the language service that will provide syntax highlighting and code analysis for the file type, see examples)
- Click on Add
- Click on Ok
File type association examples
Economy
Language Service | File Type |
|---|---|
| json | *.ecc |
| json | *.eci |
| json | *.ecv |
| json | *.ecr |
Remote Config
Language Service | File Type |
|---|---|
| json | *.rc |
Leaderboards
Language Service | File Type |
|---|---|
| json | *.lb |
Access Control
Language Service | File Type |
|---|---|
| json | *.ac |
Matchmaker
Language Service | File Type |
|---|---|
| json | *.mmq |
| json | *.mme |