pycharmsyntax-highlightingfile-associationrcpylintrc

File type association (syntax highlighter) for .rc file


What is the correct file type association for a .rc file in PyCharm?


What I Found

Syntax highlighter for config files (.cfg, .ini, .rc)

Suggests using the Ini plugin, however in my opinion, a .rc file is not a .ini file.


My Specific Use Case

In my specific use case, I have a .pylintrc file. I am unsure of what to pick, currently, I just selected Text.

pylint rc file

Here is pylint's example .pylintrc file: https://github.com/PyCQA/pylint/blob/master/examples/pylintrc

I'm using PyCharm PE 2020.1


Solution

  • Pick INI config File Type.

    In PyCharm go to Settings/Preferences -> Editor -> File Types -> INI Config and add to File name patterns .pylintrc file and if it asks - reassign from Text association to INI.

    Example:

    Settings File Types

    P.S. I have the same ini plugin. And I made this trick just to answer your question. It works.