kflu / vrod

Vim built-in Racket Omnicompletion and Documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VROD: Vim built-in Racket Omni-completion and Documentation

VROD!

Why browse HTML pages when you can view docs right in Vim with K?

This plugin programmatically turns Racket reference docs into Vim help. That’s kinda’ weird, but works out well. Racket doesn’t have help built into its repl or source code, so the niceties of Clojure inline docs are not very possible without things like this plugin.

Use K while on any Racket function to access its reference help documentation through Vim’s help system.

BONUS: Use CtrlXO to omni-complete any standard Racket function. Actually, just use CtrlN/CtrlP, since it’s not yet smart enough to bother with true Omnicompletion.

There is also an extended syntax file for carefully highlighting all the programmatically discovered functions, yet carefully excluding Racket primitives. This is helpful because vim-racket misses quite a few functions.

How It’s Made

The full set of Racket’s Reference scribble docs has been converted to text, and parsed/munged a bit to add *foo* markers that Vim’s :helptags uses.

Then those markers were collected into a list that Vim uses for omnicompletion and syntax recognition.

Installation

If you use Vundle/Pathogen, note that the doc generation phase is not like other Vim plugins. The tags file is already part of this plugin (it’s a pain to build), so you don’t want Vundle/Pathogen trying to build it. But don’t worry about this; it should be transparent.

Shortcomings

  • Cannot completing functions from all packages
  • Not smart omnicompletion yet; using dictionary instead for now

About

Vim built-in Racket Omnicompletion and Documentation


Languages

Language:Vim Script 98.1%Language:Shell 1.9%