Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event attribute source #5

Open
victorteokw opened this issue Nov 28, 2014 · 3 comments
Open

Add event attribute source #5

victorteokw opened this issue Nov 28, 2014 · 3 comments

Comments

@victorteokw
Copy link
Owner

No description provided.

@osv
Copy link
Contributor

osv commented Dec 5, 2014

I think no need event attributes, because you can get them all from tern.js (tern-auto-complete)

just add "browser" to your ".tern-project" located in your html project dir:

{
  "libs": [
    "browser",
  ],
    "plugins": {
    }
}

and in your web-mode setup

(defun my-web-mode-hook ()
  "Hooks for Web mode."
  (setq web-mode-ac-sources-alist
        '(("css" . (
                    ac-source-css-property
                  ))
          ("html" . (
                     ac-source-tern-completion
                     ac-source-html-tag
                     ac-source-html-attribute
             ac-source-html-attribute-value
                     ))
          ("jsx" . (
                     ac-source-tern-completion))
          ("javascript" . (
                     ac-source-tern-completion))))
  (setq web-mode-enable-auto-quoting nil)
  (auto-complete-mode t)
  (tern-mode t))

Maybe update readme with few words about tern?

@victorteokw
Copy link
Owner Author

"event attribute source" I mean "onload", "onbeforeprint", "onclick". Now our html attribute only covers normal attributes.

@victorteokw
Copy link
Owner Author

Most users who using this package, are web developers and write javascript, too.
Add some words about tern is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants