forked from rooney/zencoding
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Readd emmet-expand-jsx-className or alternative variable #138
Comments
Any fix? |
I found a work around for this. Replace the function definition in (defun emmet-jsx-supported-mode? ()
"Is the current mode we're on enabled for jsx class attribute expansion?"
(or (member (file-name-extension buffer-file-name) '("jsx" "tsx"))
(member major-mode emmet-jsx-major-modes))) |
Had to do a similar thing: (defun emmet-jsx-supported-mode? ()
"Is the current mode we're on enabled for jsx class attribute expansion?"
(or (member major-mode emmet-jsx-major-modes)
(and (string= major-mode "web-mode") (string= web-mode-content-type "jsx")))) Would be nice addition if we had the ability to extend that function. Something like: (defun emmet-jsx-supported-mode? ()
"Is the current mode we're on enabled for jsx class attribute expansion?"
(or (member major-mode emmet-jsx-major-modes)
(emmet-jsx-supported-func)))
(defcustom emmet-jsx-support-func nil
"User defined custom that returns `t` if jsx support should be enabled, and `nil` for not"
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I use Emmet mode with web-mode and JSX. I always used
(setq-local emmet-expand-jsx-className? t)
from a custom web-mode hook that checks the file extension for "jsx" or "tsx" to get className= instead of class=. The new approach ofemmet-jsx-major-modes
doesn't work well with web-mode + JSX, because the major mode is alwaysweb-mode
for both HTML as JSX/TSX files. Is there any workaround for this, or a way to bring a variable like emmet-expand-jsx-className back?The text was updated successfully, but these errors were encountered: