Problem
Many tools use custom file extensions for standard file formats (e.g., .xrm or .vsconfig for JSON, .axaml or .slnx for XML).
Currently, SourceGit doesn't recognize these custom extensions as standard JSON/XML - or most of them, which affects syntax highlighting in the diff/file viewer. Hardcoding these extensions directly into SourceGit wouldn't be maintainable long-term.
Proposed Solution
Implement a customizable file association mapping similar to VS Code's files.associations setting.
VS Code handles this cleanly through files.associations, allowing users to seamlessly map glob patterns or custom extensions to built-in language parsers.
"files.associations": {
"*.axaml": "xml",
"*.DotSettings": "xml",
"*.fakes": "xml",
"*.lutconfig": "xml",
"*.ncrunchproject": "xml",
"*.ncrunchsolution": "xml",
"*.osts": "ts",
"*.pssproj": "xml",
"*.slnx": "xml",
"*.user": "xml",
"*.vbm": "xml",
"*.vsconfig": "json",
"*.vsext": "json",
"*.vsixmanifest": "xml",
"*.xrm": "json",
"*.xrm2": "json",
"*.xrmconfig": "json",
"*.xrmsuo": "json",
"Bookmarks*": "json"
}
This could be configured via preference.json (or exposed in the Preference window).
Problem
Many tools use custom file extensions for standard file formats (e.g.,
.xrmor.vsconfigfor JSON,.axamlor.slnxfor XML).Currently, SourceGit doesn't recognize these custom extensions as standard JSON/XML - or most of them, which affects syntax highlighting in the diff/file viewer. Hardcoding these extensions directly into SourceGit wouldn't be maintainable long-term.
Proposed Solution
Implement a customizable file association mapping similar to VS Code's
files.associationssetting.VS Code handles this cleanly through files.associations, allowing users to seamlessly map glob patterns or custom extensions to built-in language parsers.
This could be configured via
preference.json(or exposed in the Preference window).