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 completion-at-point-function #140

Open
vmsp opened this issue Feb 13, 2022 · 1 comment
Open

Add completion-at-point-function #140

vmsp opened this issue Feb 13, 2022 · 1 comment

Comments

@vmsp
Copy link

vmsp commented Feb 13, 2022

It would be great if emmet supported a completion at point function so it could be easily plugged into Emacs' completion system.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Completion-in-Buffers.html

@vmsp
Copy link
Author

vmsp commented Feb 13, 2022

In case someone finds this useful, I ended up doing:

(defun vsp/emmet-expand ()
  (let ((bounds (bounds-of-thing-at-point 'symbol)))
    (list (car bounds) (cdr bounds)
          (lambda (str pred action) (emmet-transform str))
          :exclusive 'no)))

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

No branches or pull requests

1 participant