I am using Atom 1.33.0 on MacOS X 10.13 High Sierra
To configure atom to recognize files with the extension ".ini" as Java Properties and apply the appropriate syntax highlighter I checked the following links:
- GitHub Atom: How to apply a particular syntax highlighting to some files based on name
- https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539
- https://flight-manual.atom.io/using-atom/sections/basic-customization/#finding-a-languages-scope-name
- https://stackoverflow.com/a/51321435/6204861
- https://discuss.atom.io/t/using-customfiletypes-to-change-the-language-for-html/40230
and assumed that the following config.cson would work:
"*":
core:
telemetryConsent: "no"
themes: [
"atom-light-ui"
"atom-light-syntax"
]
customFileTypes:
'source.Java Properties': [
'ini'
]
...
unfortunately this does not have the desired effect.
To find the correct name i opened an example Java Properties ".ini" file as "Plain Text". Then I changed the syntax highlighting manually to "Java Properties" by clicking in the bottom right corner. Then I pressed Alt-CMD-P which showed:
So "source.java-properties" should be the correct name. I modified config.cson accordingly to:
"*":
core:
telemetryConsent: "no"
themes: [
"atom-light-ui"
"atom-light-syntax"
]
customFileTypes:
'source.java-properties': [
'ini'
]
And still it does not work.
What needs to be changed to make it work?