Are you sure you want to use shaders to do this?
You can draw lines without a shader by simply using the
Line2D node, or by drawing it in code inside the
draw_line(Vector2(10, 10), Vector2(50, 30), Color(1, 1, 0))
If you know all that but want to do it in a fragment shader, this is a whole different story... you'd probably need to use the distance field of such line (a formula giving the distance from it) and then output pixels of the color of your choice when that distance is lower than some amount, which sounds quite involved for what you want to achieve.