neovimhaskell / nvim-hs

Neovim API for Haskell plugins as well as the plugin provider
Other
267 stars 18 forks source link

Question: Is it possible to make this compatible with vim? #42

Open jvican opened 8 years ago

jvican commented 8 years ago

Hey!

Congrats, this is awesome!

I am just wondering if there is a way to develop not only for nvim but for vim. I need backwards compatibility with older versions of vim. Perhaps something can be done to make it work?

saep commented 8 years ago

I don't know how I could interface with vim from Haskell. One of nvim's innovative features is the msgpack-rpc API which vim lacks.

It's certainly possible, but requires a lot of work. You (i.e. not me :P) could recreate the msgpack-rpc functionality in pure vimL and synchronize the exported functions with nvim, for example. But this approach will likely result in an API-compatibility hell.

If you need portable plugins, use vimL. In the future haskell-ide-engine, combined with some frontend-specific glue code, might be an alternative.

jvican commented 8 years ago

Good to know haha! Thanks for the info, I will look into this and see if it's convenient... I was looking forward to use Haskell instead of the annoying vimL :+1:

BTW, great job with this!

saep commented 7 years ago

I think with vim 8 a lot of this code base can be reused. For that I would probably mimick the messagepack-rpc protol with json instead of messagepack. This way only the transport layout would have to be exchangeable. Function/Command/Autocommand registration is then the major thing to think about.

I'm happy to help designing or discussing this if someone wants to dedicate some time on this.