Skip to content
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

How to document my code in Howl? #547

Open
winterwolf opened this issue Jan 23, 2020 · 1 comment
Open

How to document my code in Howl? #547

winterwolf opened this issue Jan 23, 2020 · 1 comment
Labels

Comments

@winterwolf
Copy link

winterwolf commented Jan 23, 2020

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

@shalabhc
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants