What has worked for me against Rosalina is fighting her similarly to how you would fight Ice Climbers in Melee. You can split them up and easily kill the Luma, which gives you a good period of time to fight Rosalina alone.
Sortof. The thing to remember is that Luma is not Nana. Luma is gonna come back in a little bit, so Rosalina only needs to stall for a little. Also, Rosalina can handle herself pretty well regardless. I can't count the number of times someone has knocked away my Luma only for me to shrug and continue racking up damage on them because Luma is a luxury, not a necessity.
Yes, getting rid of Luma does help because it shuts down a major gimmick, gets rid of 2 specials, and basically nerfs all of Rosalina's attacks, but in the end RosaLuma is not Ice Climbers and Rosalina is not gonna die without her Luma the same way that Popo would die without Nana. At worst I just have to play defensively for a little while, and sometimes I don't even have to do that.
how do you deal with rosalina? seriously that luma is annoying then she has attacks of her own to go with it.
As a RosaLuma player myself, I'd say that my hardest matchups are against fast characters like ZSS. The constant pressure makes it so that I can't really set up anything special with my Luma, and many of my KO attacks are really slow. I have one fast KO move (Luma Launch) that works pretty well even uncharged, but if I whiff it I need to recall my Luma (or wait for it to respawn) before I can do it again. In fact I'd say that KOing is pretty much her biggest weakness. ROB and Yoshi also do well against me, mostly because it's hard for me to figure out when it's safe to attack them while they can attack all the time. Little Mac does well unless I can get him in the air somehow. I'd say that if you want to beat Rosalina, always apply pressure.
The reason why that matters is because Rosalina is a little on the slow side. I can still win if I can read my opponents but some are certainly hard to keep up with.
Another thing is that sometimes it's better to just ignore the Luma and go after Rosalina. That Luma Launch is chargable, but it can't be cancelled out of even by dodging. Once she starts it she has committed to firing it at some point. After she fires, there's plenty of time to jump over the incoming Luma and close the distance to Rosalina, and if she makes the mistake of recalling her Luma then you have enough time to punish her during the recovery lag. If she doesn't recall her Luma, then you can probably expect a down tilt because that's one of her best options against an incoming enemy.
As for the topic itself:
For projectile spammers, well... that really depends upon the type of projectile. Who's projectiles are you having trouble with? The answer to that really makes a difference. Robin can only spam for so long before s/he has to toss his/her book away. Lucario can be powerful when damaged, but really his projectile requires a long charge-up time to be strong. Most projectiles have some kind of drawback that you can exploit, if only you know how. I've yet to meet any opponent that I couldn't approach in some way.
My advice against projectile campers in general, you have 2 general options.
A) Jump over the spam and attack from the air. This can actually be a pretty good option if you catch them while they're charging or in the middle of some other kind of lag.
B) Roll around the spam and then counter whenever you're close enough. If you're close, the projectile will trigger the counter and the counter will hit the spammer. Yes rolling is punishable but only if the enemy is in a position to punish it. "At range and charging up the next projectile" is generally not that kind of position.
I'd also recommend swapping to Lucina, as she seems to be a fair bit more powerful in FG than Marth is. I've met some really good Lucinas, but Marth has overall been pretty weak in that format.