I am very interested in this (for completion, in particular). Do you have thoughts or pointers if I wanted to take a crack, myself?
I would start by creating a socket and try to get the communication with a server working. TextMate already has an interface for showing completion results, via the Dialog plugin [1]. Not sure if you should continue to use the plugin or move that code directly into TextMate. Note, the completion interface does not support showing any documentation, as far as I can see.