spadgos / sublime-jsdocs

Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom docblock tags

mbrodala opened this issue · comments

Docblockr already supports language-specific @tags in docblocks. It would be useful to have an option to define arbitrary custom tags which are shown upon completion.

Take this example from an TYPO3 Extbase class:

/**
 * @var \TYPO3\CMS\Extbase\Object\ObjectManager
 */
protected $objectManager;

Now I would like to add a @inject tag here but since it's not part of any standard, I have to type it fully.

Thus I'd suggest a new option, e.g. jsdocs_custom_tags (unfortunately jsdocs_extra_tags is already taken) to accommodate a list of custom tags.

Just noticed that I can achieve this easily with a custom php.sublime-completions file in my User packages directory like this:

{
  "scope": "source.php comment.block.documentation",
  "completions":
  [
    { "trigger" : "@inject", "contents": ""},
  ]
}

Works for me. :-)