-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resuscitate / provide VIM support #1
Comments
Hey @alanz! I've been toying around with making this happen as a weekend / new years' holiday project. I've got passable support for The one big issue that I've run into is parsing the elisp output of ghc-hare - currently I have this disgusting mess of Furthermore (and I know I really should open a new issue for this, but hey), I can see a fair amount of cleanup to be done in some of the haskell backend source itself - this block, as an example, could use |
Just a quick comment without looking properly as I am going to bed. I would definitely recommend going the haskell-ide-engine route, as it already exposes Hare, and you will be able to access other plugins too. See https://cocreature.github.io/haskell-ide-engine/plugins/hare.html |
As far as PR's to clean up the code, they are welcome for bits that are already stable (such as renaming) I am going through a process of porting code from the earlier implementation, and there is a surprising amount of subtlety/detail in it, so I tend to preserve the original as much as possible initially. And of course a lot of the code is just horrible as I have been learning haskell as I go along. A lifelong experience. There are some options for your plugin
I am obviously biased toward the latter, but will change format if you prefer/accept a PR for a different format |
I'm definitely with you on integrating with haskell-ide-engine - the only problem is since that's a background process with an HTTP interface (a decision which I support, for the record) dealing with it from pure vimscript becomes all but impossible. That being said, there are plenty of popular vim plugins that do the rpc/ipc + background process approach to great success with things like Python/Lua/what have you. I think I'd like to go forward with trying to do vim bindings for ghc-hare as a standalone for now, since the shell-out approach is really easy to deal with. In the future, however, I'm super interested in putting the work in to try and get haskell-ide-engine working well with vim |
hie also has a stdio/JSON transport, which the emacs integration uses. And is open to others, if required. |
In fact I would probably call the stdio transport the main transport atm, simply because that’s what emacs and I think also leksah use it and those are the only integrations we have so far. I’d be happy to help you with the vim integration where I can (I’m not a vim user). If stdio is not convenient for you just tell us what you need and we’ll try to provide that. |
by stdio do you mean I can pipe JSON to an invocation of hie? like |
@cocreature That sounds like an interesting way of doing it. hie expects to run as a daemon, so we should maybe add base:exit to ask hie to exit when done |
Or we could add an |
@cocreature that's totally fair. There comes a point where you're sacrificing too much just to get around vim's subpar process management support |
And if you can't wait: haskell/haskell-ide-engine#158 |
Possibly based on https://github.com/alanz/HaRe/tree/master/old/editors/Vim
cc @gibiansky
Originally https://github.com/alanz/HaRe/issues/40
The text was updated successfully, but these errors were encountered: