Yes anything is possible and people have done work that probably intersects with what you're looking to do. But rarely does anything just work.
I spend too much time try to make things work and re-implementing features that exist in other environments. I tend to use Textmate and Intellij -- although extending Intellij is such a heavy process that I pretty don't do it.