A Pure Lua Docstring Generator for NeoVim
Please note: This plugin is still under active development.
Expect significant changes in upcoming versions.
Nvim-Dox is designed to generate docstrings in NeoVim, offering:
- API Exposure: Easily register new docstring dialects.
- TSNode Parsers: Provides parsers for interpreting
TSNode
. - TSNode Queriers: Queriers for retrieving the relevant
TSNode
. - Snippet Managers Integration: Seamlessly integrates with snippet managers.
Install Nvim-Dox using your preferred NeoVim plugin manager.
- Basic Usage: Execute the
Dox
command to generate a docstring for theTSNode
at the cursor position. - Specific Node Type: Use the command
Dox <type>
to generate a docstring for the closestTSNode
of type<type>
.
Contributions are always welcome! Feel free to open a PR or raise an issue. I aim to respond as promptly as possible.
Feature | Priority |
---|---|
Add documentation (doc/vimdoc ) |
1 |
Implement Checkhealth for troubleshooting |
1 |
Integrate with other snippet engines | 1 |
Develop Dox generate for document generation |
2 |
Support other document engines | 2 |
Incorporate namespace/inheritance support (major change) | 3 |
Other completion sources | 3 |
A quick rundown of the plugin's operation:
- Initiate the
Dox
command. - Fetch the
TSNode
through the specifiedQuerier
functions. - Load the relevant docstring template based on the current filetype.
- Populate the template, replacing format masks using the
Parser
. This interprets theQuerier
results. - If a snippet engine is present, the generated string is registered.
- Finally, the docstring is output.
This project is under the MIT License. Refer to the LICENSE file for more details.