I would encourage you to learn scales. I know, really boring...but awesome results! This is a method from Berklee school of music, and will allow to play whatever you hear.
My method is to learn scales up and down, as well as connecting octaves to use the full range of the fret board. After finding all of the notes in key of G, for instance start then to practice these while playing with a metronome set at minimum speed. Then begin patterns of alternating the intervals up, back down, up more, etc. When this is accomplished while counting OUT LOUD the goal is to mix up as many combinations of interval patterns, time signatures, skipping beats, crossing strings, and picking up in a different octave at the right place.
This should practiced methodically in all twelve keys. And in the seven modes.
Another very important point is to discipline your right hand technique with up and down or patterns associated with triplets, for instance. I attempt to keep my hand closed, not resting fingers on the pick guard for better speed.
Practice also chord scales, and different patterns like 1-4-5, 6-2-5-1, etc, also play the corresponding scale and mode of that chord from that place on the fret board between the chords.
Whew! Kind of long winded. Wanna play jazz?