mattn / emmet-vim

emmet for vim: http://emmet.io/
http://mattn.github.io/emmet-vim
MIT License
6.39k stars 411 forks source link

Unknown error while trying to parse custom snippets #535

Closed Tagvi closed 2 years ago

Tagvi commented 2 years ago

I added this to my init.vim on line 45

let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.snippets.json')), "\n"))

and inside the .snippets.json is

 {
 "script": "<script type='module' src='${0}'> </script>"
 }

And I assume this is enough config for it to work. Next up I get this error message: Error detected while processing /home/tagvi/.config/nvim/init.vim: line 45 (Nothing else)

I have the web API installed. Arch Linux Kernel: 5.10.87-1-lts Neovim 0.6.0-1

Ways to reproduce: Edit any file using nvim

Tagvi commented 2 years ago

Looks like I didn't have web-api properly installed

mattn commented 2 years ago

FYI, vim have json_decode()

2022年1月7日(金) 21:50 Otar Natsvaladze @.***>:

Looks like I didn't have web-api properly installed

— Reply to this email directly, view it on GitHub https://github.com/mattn/emmet-vim/issues/535#issuecomment-1007382721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACO735NVR3KJJPG2QSZC3UU3OQFANCNFSM5LCJITCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>