The Mastermind rogue in my game was well hidden when he threw a flask of holy water at a shadow demon that attacked his ally. In the moment, it made the most sense to me to allow him to use Sneak Attack while hitting the fiendish creature with the flask.
The description of Holy Water says:
As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon. If the target is a fiend or undead, it takes 2d6 radiant damage. [...]
The rogue's Sneak Attack feature says:
[...] Once per turn, you can deal an extra 1d6 damage to one creature you hit with an attack if you have advantage on the attack roll. The attack must use a finesse or a ranged weapon. [...]
Now, post-session, I'm wondering whether Sneak Attack can actually be applied to an improvised weapon. I ruled it as a ranged weapon attack since he threw it, but now that I'm thinking about it: an improvised weapon might not be considered as a ranged weapon. And that would mean that a Sneak Attack could not have triggered when hitting with the flask. Unless an improvised weapon is also a ranged weapon when used as such. In that case, it could trigger.
I'm not sure which interpretation is correct according to the books. So, can Sneak Attack be used when hitting with an improvised weapon?