Update .config/nvim/lua/plugins/conform.lua

This commit is contained in:
punkfairie 2024-04-22 19:41:24 -07:00
parent e4f0864fa7
commit 5409d7a8b9
No known key found for this signature in database
GPG key ID: 284B78B49C058673

View file

@ -7,8 +7,10 @@ return {
-- @class ConformOpts
opts = {
formatters_by_ft = {
{{ if not .isServer -}}
-- lua
lua = { "stylua" },
{{ end -}}
-- data/conf
sql = { "prettier" },
@ -19,16 +21,18 @@ return {
-- web
html = { "prettier" },
liquid = { "prettier" },
css = { "stylelint", "prettier" },
scss = { "stylelint", "prettier" },
javascript = { "eslint", "prettier" },
typescript = { "eslint", "prettier" },
vue = { "eslint", "prettier" },
css = { {{ if not .isServer }}"stylelint", {{ end }}"prettier" },
scss = { {{ if not .isServer }}"stylelint", {{ end }}"prettier" },
javascript = { {{ if not .isServer }}"eslint", {{ end }}"prettier" },
typescript = { {{ if not .isServer }}"eslint", {{ end }}"prettier" },
vue = { {{ if not .isServer }}"eslint", {{ end }}"prettier" },
markdown = { "prettier" },
{{ if not .isServer -}}
-- php
php = { "pint" },
blade = { "blade-formatter", "rustywind" },
{{ end -}}
-- shell
sh = { "shellcheck", "shfmt" },
@ -41,6 +45,7 @@ return {
shfmt = {
prepend_args = { "--indent=2", "--case-indent", "--binary-next-line", "--func-next-line" },
},
{{ if not .isServer -}}
pint = {
meta = {
url = "https://github.com/laravel/pint",
@ -53,6 +58,7 @@ return {
args = { "$FILENAME" },
stdin = false,
},
{{ end -}}
},
},
},