- Nova extension to make writing documentation easier
- 2604 Installs
DocBlockr for Nova
Nova extension to make writing documentation easier.
DocBlockr helps you add documentation comments to your source code. Just type
/** in the editor and select the completion suggestion.
If the line directly afterwards contains a function definition or variable declaration, some documentation is automatically added with placeholders you can tab through. DocBlockr will try to make an intelligent guess about the return value of a function.
To (re-)format a comment block select it (or just place the cursor inside) and select Editor > DocBlockr > Format DocBlock.
This started as a port of DocBlockr for Atom by Nikhil Kalige, which is a port of DocBlockr for Sublime Text by Nick Fisher. By now large parts of the original code were refactored and I basically kept the RegExp only. More or less.
I may eventually try to port other languages from the original package if there’s a high demand.
Portuguese translation by Gwyneth Llewelyn
- Added support for Java, ObjC/ObjC++ and Rust. There may be issues!
- v0.6.1 introduced new bugs, so I reviewed the whole code and found even more bugs and weird stuff some of which I for the life of me can't remember why I did.
- Additionally Nova’s indentation logic breaks DocBlockr in many cases, so I have also rewritten that part. Hoping this won’t introduce new bugs.
- Portuguese translation by Gwyneth Llewelyn
- German language additions (Gwyneth Llewelyn)
- C/C++ support ... also requested by Gwyneth ;^)
- Comment extension (experimental feature) Pressing return inside a docblock will try to insert a leading asterisk and maintain indentation. This is very hacky code, which constantly tracks cursor position and docblock contents. This may slow down your editor, which is why this is an experimental feature and disabled by default. Can be enabled in global settings.
- minor fixes
- Custom tags for header blocks (global and per workspace)
- bug fixes
- Better handling of different line endings
- Completions now also provide a header block as first comment in a document Additional/default fields for this will be added in v0.4
- Added menu command to add docblocks
- Added menu command to (re-)format docblocks Wrap width is currently hard-coded to 80 characters
- more code cleanup
- Tag completions (@...)
- Reworked preferences handling
- Catching false positives Statements which look like functions to DocBlockr (if, for, switch, while)
- some code cleanup
First halfway decent working version
Copyright (c) 2021 Hendrik Meinl
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.