neoclide / coc-emmet

Emmet extension for coc.nvim
178 stars 9 forks source link

Include on demand for current buffer #12

Closed filipekiss closed 1 year ago

filipekiss commented 4 years ago

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.

nghialm269 commented 4 years ago

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.