A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.jetbrains.com/help/rider/Creating_and_Registering_File_Types.html below:

File type associations | JetBrains Rider Documentation

File type associations

For language-specific features (such as syntax highlighting and code analysis) in files representing different languages and technologies, JetBrains Rider maintains a list of file types, each of which links a language service with one or more file name patterns.

The default list of file types covers all relevant file name patterns, but you can add new file types for your custom language files and change the associated file name patterns for existing file types.

If you are working on a language that is not supported in JetBrains Rider by default, there might be plugins supporting that language . The file type gets automatically associated with the plugin as soon as the plugin is correctly installed.

When you open a file in the editor, JetBrains Rider chooses the file type and the corresponding language service according to the file name pattern. If the file name does not match any of the patterns registered for file types, you can associate the file name pattern with a specific file type.

Apart from that, you can make JetBrains Rider the default application for opening specific file types from the file manager on your operating system.

Add a custom file type

If you work on a language that is not supported by default and there are no plugins for it, you can configure a simple language service for files associated with this language — you will enjoy syntax highlighting for keywords, comments, and braces and have some basic editor helpers such as adding line/block comments with Ctrl+//Ctrl+Shift+/ and extending/shrinking selection according to the structure with Ctrl+W/Ctrl+Shift+W.

  1. Press Ctrl+Alt+S to open settings and then select .

  2. In the Recognized File Types section, click , specify the name of the new type, and provide a description.

  3. In the Syntax Highlighting section, configure case sensitivity, brace matching settings, and specify ways of defining comments:

  4. In the Keywords section, you can specify up to four lists of keywords. Keywords of each list will be highlighted differently in the editor and will be auto-completed.

  5. The Ignore case checkbox indicates whether keywords in files of the custom format are case-sensitive.

  6. You can customize colors for syntax highlighting of language-specific keywords, comments, and other identifiers on the settings page.

Configure associations between file name patterns and file types Associate a file name pattern with a file type
  1. In the Explorer tool window Alt+1, select a file that you want to associate with specific file type.

  2. Press Ctrl+Shift+A or choose from the main menu. In the popup that opens, start typing Associate with File Type..., select the corresponding item and press Enter.

  3. In the Register New File Type Association dialog, select the necessary options:

  4. From the File pattern list, select whether you want to specify a type for the current file (file.extension) or for all files with this extension (*.extension).

  5. Select one of the following options:

  6. Click OK to apply the settings.

Change file name patterns associated with a file type
  1. Press Ctrl+Alt+S to open settings and then select .

  2. From the Recognized File Types list, select the file type that you want to associate with other file name patterns.

  3. Use the File name patterns section to make the necessary changes. You can add a new pattern (), remove an existing one (), or modify an existing pattern ().

If your solution contains files in proprietary formats, such as .pdf and .docx, JetBrains Rider will open these files using the default application configured in your operating system. When a specific proprietary file format is not recognized, or you want to open certain files with the system application, you can add the necessary associations.

Configure file name patterns associated with system applications
  1. Press Ctrl+Alt+S to open settings and then select .

  2. In the Recognized File Types list, select Files opened in associated applications.

  3. In the File name patterns section on the right, click and specify a filename pattern that should be associated with an external application.

If a file is correctly associated with a specific file type by its file name pattern, but you want to process this file differently, you can override the file type association for this file only — other files matching that pattern will not be affected.

Override file type for a specific file
  1. In the Explorer tool window Alt+1, select one or more files that should have another file type association,

    press Ctrl+Shift+A or choose from the main menu. In the popup that opens, start typing Override File Type, select the corresponding item and press Enter.

  2. From the list that opens, select a new file type.

    Use speed search to find the required file type faster.

  3. To restore the original file type association according to the file name pattern, select the affected files, press Ctrl+Shift+A or choose from the main menu. In the popup that opens, start typing Revert File Type Override, select the corresponding item and press Enter.

Make Rider the default app for .sln, .csproj, and other file types

You can make JetBrains Rider the default application for opening specific file types from the default file manager on your operating system.

  1. Press Ctrl+Alt+S to open settings and then select .

  2. Click Associate File Types with JetBrains Rider and select the file extensions you want to open with the IDE.

  3. Click OK and close the dialog.

    If you are using macOS, restart your computer to apply the changes.

Ignore files and folders

JetBrains Rider also maintains a list of files and folders that are completely excluded from any kind of processing. Out of the box, this list includes temporary files, service files related to version control systems, and so on:

*.pyc;*.pyo;*.rbc;*.yarb;*~;.DS_Store;.git;.hg;.svn;CVS;__pycache__;_svn;vssver.scc;vssver2.scc;

Modify the list of ignored files and folders
  1. Press Ctrl+Alt+S to open settings and then select .

  2. Switch to the Ignored Files and Folders tab.

    You can add a new extension (), remove an existing one (), or modify an existing extension ().

  3. Apply the changes and close the dialog.

Configure shebang commands for file types

JetBrains Rider can recognize file types by the path specified on the shebang line. A shebang is a combination of characters in a script file followed by a path to the interpreter program that should execute this script. It starts with #! and it is always located on the first line of a script file.

  1. Press Ctrl+Alt+S to open settings and then select .

  2. From the Recognized File Types list, select the file type for which you want to configure a command.

  3. In the HashBang patterns area, click (Add HashBang Pattern).

  4. In the dialog that opens, specify the pattern that the IDE will use to recognize a file type, then click OK.

  5. Apply the changes and close the dialog.

08 August 2025


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4