Skip to content

Instantly share code, notes, and snippets.

@rehanift
Created October 12, 2011 17:08
Show Gist options
  • Save rehanift/1281845 to your computer and use it in GitHub Desktop.
Save rehanift/1281845 to your computer and use it in GitHub Desktop.
How to get js2-additional-externs working with js2-mode
(defun rli-add-jasmine-externs()
(when (string-match "_spec.js" (buffer-file-name))
(setq js2-additional-externs
'("jasmine" "describe" "xdescribe" "it" "xit" "expect" "spyOn"
"beforeEach" "afterEach" "runs" "waits" "waitsFor")))
)
(add-hook 'js2-mode-hook 'rli-add-jasmine-externs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment