You can create a css snippet and activate/deactivate in Settings > Appearance.
If you want to hide specific extensions (e.g. images), you can use something like this:
.nav-file .nav-file-title[data-path$=".jpeg"],
.nav-file .nav-file-title[data-path$=".jpg"],
.nav-file .nav-file-title[data-path$=".png"] {
display: none;
}
If you want to hide all the types except .md files, then you can use this:
.nav-file .nav-file-title:not([data-path$=".md"]) {
display: none;
}