prettier.lua 930 B

123456789101112131415161718192021222324252627
  1. local prettier = require("prettier")
  2. prettier.setup({
  3. bin = 'prettier', -- or `'prettierd'` (v0.23.3+)
  4. filetypes = {"css", "graphql", "html", "javascript", "javascriptreact", "json", "less", "markdown", "scss",
  5. "typescript", "typescriptreact", "yaml", "vue", "lua"},
  6. cli_options = {
  7. arrow_parens = "always",
  8. bracket_spacing = true,
  9. bracket_same_line = false,
  10. embedded_language_formatting = "auto",
  11. end_of_line = "lf",
  12. html_whitespace_sensitivity = "css",
  13. -- jsx_bracket_same_line = false,
  14. jsx_single_quote = false,
  15. print_width = 80,
  16. prose_wrap = "preserve",
  17. quote_props = "as-needed",
  18. semi = true,
  19. single_attribute_per_line = false,
  20. single_quote = true,
  21. tab_width = 2,
  22. trailing_comma = "es5",
  23. use_tabs = false,
  24. vue_indent_script_and_style = false
  25. }
  26. })