What could be a good and appropriate synonym for idiomatically? I want to use it in phrase " both literally and the synonym"
I think the word you're looking for is figuratively.
of the nature of or involving a figure of speech, especially a metaphor; metaphorical and not literal: The word “head” has several figurative senses, as in “She's the head of the company.” Synonyms: metaphorical, not literal, symbolic.
both literally and linguistically correct; There is no real synonym for idiomatically