Floating enchantment

Hello! I'm trying to make a bow/crossbow enchantment that makes it so the arrow shoots in a straight line rather than being affected by gravity. My first instinct was to try to use a function to set the arrow's gravity attribute to 0, but then I learned that you can't do that for arrows. Then I tried to look for data that I could modify with the /data command, but couldn't find anything like that (maybe I just didn't look hard enough though, I'm not good with /data stuff.) Is there a good way to do this?

Continue to help post