Custom file extension automatically shown/edited in syntax highlighter

What I’m imagining is that we’ve got this plugin where you’re allowed to add known languages which we’ve already got a syntax highlighting for, and then further more that you’re allowed to add which extension are associated with this language.

This should then also extend which files are viewable in the file explorer, and when you open the file, it’ll automatically show the file with syntax highlighting present.

Basically, the plugin would add the code block fences around the file, with the configured the language, and strip this off before saving the file. Other than that it’ll be handled as an ordinary markdown file, which in this case in all essence is a rather large code block.

Is this doable, and if I were to attempt coding something like this, do you have any pointers regarding where and how to define the new views needed to do this? (I’m a coder by profession, but haven’t done any plugin coding. Yet. )