as an ADHDer, one thing I've found key is figuring out what things in my environment and mind are the things I want to signal "you're doing the right thing, keep going."
A dopamine deficiency will cause you to seek out more frequent reward. So if you find a way to make your brain recognize reward that is on your intended path, you win.
Essentially, what is your 'reward model'? -- https://www.youtube.com/watch?v=PYylPRX6z4Q
Test-Driven-Development is one example of this.