spadgos/sublime-jsdocs — Issue #24: Documenting variables
Author: svenax
Created: 2012-01-10 12:45:04+00:00
State: open

PHP uses a `@var` tag, and JS apparently uses `@type` for the same.

I changed the `formatVar` function to

if self.inline:
out.append("@%s %s${1:%s}%s ${1:[description]}" % (
self.settings['typeTag'],
"{" if self.settings['curlyTypes'] else "",
valType,
"}" if self.settings['curlyTypes'] else ""
))
else:
out.append("${1:[%s description]}" % (escape(name)))
out.append("@%s %s${1:%s}%s" % (
self.settings['typeTag'],
"{" if self.settings['curlyTypes'] else "",
valType,
"}" if self.settings['curlyTypes'] else ""
))

and added approriate settings for typeTag in the language settings.