neoclide/coc-prettier

Is formatOnSaveFiletypes deprecated?

ruinb0w opened this issue · 2 comments

I'm using coc-prettier as code formatter. In the document of coc-prettier, format type setting like beblow. but nvim prompt Use coc.preferences.formatOnSave as language override configuration instead see :h coc-configuration-scope (json 2) How can I fix it?

"coc.preferences.formatOnSaveFiletypes": ["css", "markdown"],

Yes, use coc.preferences.formatOnSave to enable it, and this can be override by language, for example:

  "[typescript]": {
    "coc.preferences.formatOnSave": true
  },

Thank you for your answer.