Nova

Extensions


Readme

DocBlockr for Nova

Nova extension to make writing documentation easier.

Work in progress!

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.

DocBlockr currently supports JavaScript, TypeScript and PHP. You can read more about documentation comments here: JSDoc and phpDocumentor.

Note

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.


Changelog

Version 0.6.1

  • Bugfix

Version 0.6

  • Added basic support for JSX/TSX files. Enabling JavaScript also enables it for JSX. Same for TypeScript/TSX.

Version 0.5

  • 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

Version 0.4

  • Custom tags for header blocks (global and per workspace)
  • bug fixes

Version 0.3

  • 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

Version 0.2

  • Tag completions (@...)
  • Reworked preferences handling
  • Catching false positives Statements which look like functions to DocBlockr (if, for, switch, while)
  • some code cleanup

Version 0.1

First halfway decent working version


License

MIT License

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.