neoclide / coc-emmet

Emmet extension for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include on demand for current buffer

filipekiss opened this issue · comments

Hi, first of all thank you for the extension! It's great.

Is there a way to enable the coc-emmet for the current buffer only, maybe using a command?

Example: I'm working on a full-stack application and I'd like emmet to complete on the typescript files that are related to the view but not in the ones for the backend. Using the config, it's always enabled for typescript and it's a little bit noisy.

Just remove typescript mapping to typescriptreact from emmet.includeLanguages in coc config.
If you want to enable emmet for current typescript buffer, run :set ft=typescript.tsx

Or you can change your typescript view files' extension to .tsx instead of .ts.