fannheyward / coc-deno

Deno extension for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running deno fmt for Deno projects on save?

wavded opened this issue · comments

Currently, coc-prettier is formatting Deno projects rather than deno fmt which ends up with conflicting styles. Is there anyway to override this for Deno projects to use deno fmt instead?

How about setting prettier.disableLanguages at the project level by running the :CocLocalConfig command?

(Example) .vim/coc-settings.json

{
  // ...snip
  "prettier.disableLanguages": [
    "typescript",
    "javascript"
  ]
  // ...snip
}

Nice, perhaps this could be an option when initializing a project @fannheyward ?

Does this option to formatOnSaveFileType: ["typescript", "javascript"] is enabled by default? If not, how can I enable it for "jsx, tsx, js, tsx" files?

@igorbrasileiro you can add "typescript", "typescriptreact", "javascript", "javascriptreact" to your coc.preferences.formatOnSaveFiletypes.