emmet-mode icon indicating copy to clipboard operation
emmet-mode copied to clipboard

Snippets.json hook

Open Immortalin opened this issue 8 years ago • 1 comments

Is there a way to put snippets in init.el instead?

Immortalin avatar Nov 22 '15 12:11 Immortalin

I'm afraid not. emmet-mode doesn't have such a function yet.

Now snippets.json is compiled to elisp (table) syntax. => https://github.com/smihica/emmet-mode/blob/master/src/snippets.el And just bundled with the emmet-mode.el.

If you can write snippets with elisp (table) style.I think you can put it in your init.el. like:

(defparameter emmet-snippets
(let ((tbl (make-hash-table :test 'equal)))
(puthash "css" (let ((tbl (make-hash-table :test 'equal)))
(puthash "snippets" (let ((tbl (make-hash-table :test 'equal)))
....)

But it's really trouble isn't it? If you want to use json directory, It's a little difficult I think. (json parsing is required on load timing.)

smihica avatar Dec 23 '15 17:12 smihica