I don’t know too much about linear models, but following the manual of GLM you should try:
df = DataFrame(A = 1:2:1000, B = repeat(1:10, inner=50), C = 1:500)
lm(@formula(A ~ C),df)
note the missing : in front of the variables in formula.
But if you are only interested in linear regression most of the plotting options can do that for you e.g.,
http://gadflyjl.org/stable/gallery/statistics/#[Stat.smooth](@ref)-1
or
https://www.queryverse.org/VegaLite.jl/stable/examples/examples_advancedcalculations/#Linear-Regression-1