Skip to content

Commit 8dfabd6

Browse files
committed
Add google style to js.
1 parent 5cb49f9 commit 8dfabd6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

clients/docstr-js.el

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
(defcustom docstr-js-style 'jsdoc
3030
"Style specification for document string in JavaScript."
3131
:type '(choice (const :tag "No specify" nil)
32-
(const :tag "Document String in JavaScript" jsdoc))
32+
(const :tag "Document String in JavaScript" jsdoc)
33+
(const :tag "Google Style" google))
3334
:group 'docstr)
3435

3536
(defcustom docstr-js-prefix "* "
@@ -45,10 +46,19 @@
4546
docstr-format-var "%s -"
4647
docstr-show-type-name t))
4748

49+
(defun docstr-js-config-google ()
50+
"Configre for convention, Google."
51+
(docstr-util-default-format)
52+
(setq-local docstr-js-prefix "* "
53+
docstr-format-type "{%s}"
54+
docstr-format-var "%s"
55+
docstr-show-type-name t))
56+
4857
(defun docstr-js-config ()
4958
"Automatically configure style according to variable `docstr-js-style'."
5059
(cl-case docstr-js-style
5160
(jsdoc (docstr-js-config-jsdoc))
61+
(google (docstr-js-config-google))
5262
(t (docstr-util-default-format))))
5363

5464
;;;###autoload

0 commit comments

Comments
 (0)