Skip to content

feat: add custom file associations support - #2728

Open
evilbaschdi wants to merge 1 commit into
sourcegit-scm:developfrom
evilbaschdi:develop
Open

evilbaschdi wants to merge 1 commit into
sourcegit-scm:developfrom
evilbaschdi:develop

Conversation

@evilbaschdi

Copy link
Copy Markdown
  • Added CustomFileAssociations class with a JSON‑serializable Associations dictionary.
  • Refactored extension handling in TextMateHelper.GetScope to a switch statement.
  • Implemented loading of custom_file_associations.json to map specific files to custom extensions, including safe JSON deserialization with error handling.
  • Added System.Text.Json import to support deserialization.

example content of custom_file_associations.json

{
    "associations": {
        ".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",
        ".runsettings": ".xml",
        "Bookmarks*": ".json"
    }
}

- Added `CustomFileAssociations` class with a JSON‑serializable `Associations` dictionary.
- Refactored extension handling in `TextMateHelper.GetScope` to a switch statement.
- Implemented loading of `custom_file_associations.json` to map specific files to custom extensions, including safe JSON deserialization with error handling.
- Added `System.Text.Json` import to support deserialization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant