" https://github.com/MunifTanjim/prettier.nvim#setup lua < f :lua vim.lsp.buf.formatting()") -- format on save vim.cmd("autocmd BufWritePost lua vim.lsp.buf.formatting()") end if client.resolved_capabilities.document_range_formatting then vim.cmd("xnoremap f :lua vim.lsp.buf.range_formatting({})") end end, }) prettier.setup({ bin = 'prettier', -- or `prettierd` filetypes = { "css", "graphql", "html", "javascript", "javascriptreact", "json", "less", "scss", "typescript", "typescriptreact", }, -- prettier format options (you can use config files too. ex: `.prettierrc`) arrow_parens = "always", bracket_spacing = true, embedded_language_formatting = "auto", end_of_line = "lf", html_whitespace_sensitivity = "css", jsx_bracket_same_line = false, jsx_single_quote = false, print_width = 80, prose_wrap = "preserve", quote_props = "as-needed", semi = true, single_quote = false, tab_width = 2, trailing_comma = "es5", use_tabs = false, vue_indent_script_and_style = false, }) EOF