howl-editor/howl

How to document my code in Howl?

winterwolf opened this issue · 1 comments

In VSCode I can use EmmyLua to provide documentation and smart autocomplete for my code. Eclipse also support LDoc as I remember. But I have no idea which documentation format supported in Howl. I know, I can use Ctrl+Q to see documentation for standard lua classes, but how to document my own?

screenshot-001

Howl uses it's own API documentation system which you can see an example in lua/api.moon. It's attached via the mode as you can see here.

I think to integrate other kinds of docs, we'd need to write a parser that exposes the docs as a Lua table structured like api.moon above.

Another way to intergrate external docs is in the go mode, which implements show_doc - a function that calls some external tool and returns the result as a formatted buffer.

The code where this gets invoked is in show-doc-at-cursor: https://github.com/howl-editor/howl/blob/master/lib/howl/commands/edit_commands.moon#L149