It should be easy to have the icon related to a known extension for file, vscode does, but it is not well documented how.