Obsidian uses PrismJS for its code highlighting and you can see a list of supported languages here https://prismjs.com/#supported-languages
Both languages you are after are on that list and do work in obsidian.
If a language is not on the list of supported languages, you can open a feature request there.
I thought Solidity wasn’t supported and was being highlighted by an AI. And regarding assembly I just had to choose something like nasm instead of assembly.
What threw me off was javascript being highlighted on EDIT.