aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/prettier.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-12-26 19:25:36 -0500
committerSteven Arcangeli <stevearc@stevearc.com>2023-12-26 19:46:48 -0500
commitb3e0752a6c566b97e2896b486caafd4b25f4683a (patch)
treeb232e34c48c3b2b1a015972bd7071de81b01869a /lua/conform/formatters/prettier.lua
parent86393c143b8d1b7bdae1449fd25de315fd967fd7 (diff)
docs: autogenerate formatter options docs (#234)
Diffstat (limited to 'lua/conform/formatters/prettier.lua')
-rw-r--r--lua/conform/formatters/prettier.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/conform/formatters/prettier.lua b/lua/conform/formatters/prettier.lua
index 0977748..9274577 100644
--- a/lua/conform/formatters/prettier.lua
+++ b/lua/conform/formatters/prettier.lua
@@ -26,7 +26,8 @@ return {
description = [[Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.]],
},
options = {
- -- add parsers for different filetypes
+ -- Use a specific prettier parser for a filetype
+ -- Otherwise, prettier will try to infer the parser from the file name
ft_parsers = {
-- javascript = "babel",
-- javascriptreact = "babel",
@@ -45,7 +46,7 @@ return {
-- graphql = "graphql",
-- handlebars = "glimmer",
},
- -- add parsers for different extensions
+ -- Use a specific prettier parser for a file extension
ext_parsers = {
-- qmd = "markdown",
},