This plugin allows you to view documentation for any Elm dependencies your project has, both directly from within Vim as well as offline.
I wrote this plugin at elm-conf because I was working on some Elm code on the plane on my way to elm-conf, and I didn't like having to view the source of my dependencies to remember how to use certain functions. I also don't like viewing reference documentation in a web browser; I much prefer the offline, in-editor experience that plugins like manpageview and perlhelp provide when I'm working in C and Perl, respectively.
Since I wrote this hurriedly at a conference, it was rather hastily put together. It works for me, but your mileage may vary. That being said, I would love it if people played around with this and helped me out with contributions or comments!
IMPORTANT: You need to do this part while online! After it's done, you're freeeeeee
The :ElmBuildDocs
command will build a documentation database and put it into
elm-docs.json
at your project root.
Alternatively, you may do this from the command line, like so...
Run bin/build-docs.pl
from the top level of your Elm project, and direct its output
to elm-docs.json
:
$ build-docs.pl > elm-docs.json
Install plugin/elm-help.vim
however you like.
If you run the ElmHelp
command with an argument, the documentation for
that argument will be pulled up in a new window. For example, :ElmHelp Keyboard
.
If you don't provide an argument, ElmHelp
will use whatever word is under the cursor.
There are many!
elm-stuff
already@docs
)Ctrl-]
in docs pane