🌐
npm
npmjs.com › package › prettier-plugin-sh
prettier-plugin-sh - npm
An opinionated `shellscript` formatter plugin for Prettier, also support simple format of `Dockerfile`, `properties`, `gitignore`, `dotenv`, `hosts`, `jvmoptions`.... Latest version: 0.18.0, last published: 8 months ago.
      » npm install prettier-plugin-sh
    
Published   Jun 26, 2025
Version   0.18.0
Author   JounQin
🌐
Vercel
prettier.vercel.app
Prettier Plugins
We cannot provide a description for this page right now
Discussions

Prettier shell script format
Shell script is being formatted if it is inside a template literal embedded markdown script. Wondering if markdown prettier plugin could be modified to accomplish this transformation ? More on stackoverflow.com
🌐 stackoverflow.com
how to use plugins with prettierd, null-ls and lazy.nvim?
If you want to use prettierd to format file then why are you using prettier in your null ls config ? Prettier and prettierd are both different things so replace prettier with prettierd in your null ls config . More on reddit.com
🌐 r/neovim
8
1
March 17, 2024
prettier-plugin-sh: support .nvmrc files?
Coming over here from prettier/prettier#15898 (comment): I'd like to use prettier-plugin-sh to format .nvmrc files. Given that the plugin supports similar files (gitignore, dotenv, ...), is thi... More on github.com
🌐 github.com
7
June 26, 2025
Help installing Prettier for VS Code - "Command Not Found"
Aside: this is a huge gap in the VS code tooling. Salesforce needs to release an official solution or at least make this one work without needing to do all these bullshit configuration steps. More on reddit.com
🌐 r/salesforce
31
8
September 9, 2021
🌐
GitHub
github.com › astorije › prettier-plugin-sh
GitHub - astorije/prettier-plugin-sh: ⚠️🚧 This is very early stage, it is currently **not working** 🚧⚠️
September 10, 2019 - 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. This plugin adds support for Shell scripts to Prettier.
Author   astorije
🌐
Prettier
prettier.io › docs › plugins
Plugins · Prettier
Plugins are ways of adding new languages or formatting rules to Prettier. Prettier’s own implementations of all languages are expressed using the plugin API. The core prettier package contains JavaScript and other web-focused languages built in.
🌐
GitHub
github.com › un-ts › prettier › tree › master › packages › sh
prettier/packages/sh at master · un-ts/prettier
September 10, 2019 - An opinionated shellscript formatter plugin for Prettier, also support simple format of Dockerfile, properties, gitignore, dotenv, hosts, jvmoptions...
Author   un-ts
🌐
CodeSandbox
codesandbox.io › examples › package › prettier-plugin-sh
prettier-plugin-sh examples - CodeSandbox
AboutAn opinionated `shellscript` formatter plugin for Prettier, also support simple format of `Dockerfile`, `properties`, `gitignore`, `dotenv`, `hosts`, `jvmoptions`...253,670Weekly Downloads
🌐
UNPKG
app.unpkg.com › prettier-plugin-sh@0.18.0
prettier-plugin-sh
An opinionated `shellscript` formatter plugin for Prettier, also support simple format of `Dockerfile`, `properties`, `gitignore`, `dotenv`, `hosts`, `jvmoptions`...
🌐
Runkit
npm.runkit.com › prettier-plugin-sh
prettier-plugin-sh
require("prettier/package.json"); // prettier is a peer dependency. var prettierPluginSh = require("prettier-plugin-sh")
Find elsewhere
🌐
Socket
socket.dev › npm › package › prettier-plugin-sh
prettier-plugin-sh - npm Package Security Analysis - Socket
An opinionated `shellscript` formatter plugin for Prettier, also support simple format of `Dockerfile`, `properties`, `gitignore`, `dotenv`, `hosts`, `jvmoptions`...
🌐
GitHub
github.com › biomejs › biome › discussions › 3784
Support for prettier-plugin-sh · biomejs/biome · Discussion #3784
September 4, 2024 - I was trying to replace my use of prettier with biome, and realized that I have some plugins in prettier that biome does not support right now · Specifically I was looking for the shell script support.
Author   biomejs
🌐
Npm Check
npmcheck.com › package › prettier-plugin-sh
prettier-plugin-sh — Analyze Size, Security, Dependencies & Versions | npmcheck
January 14, 2026 - Format your Shell scripts and other shell languages with Prettier. prettier-plugin-sh enables Prettier to automatically format shell scripts (.sh), Dockerfile and other shell languages, creating consistent styling throughout your projects. Improve code readability and maintainability efforts ...
🌐
Yarn
yarnpkg.com › package
prettier-plugin-sh
Yarn is a package manager that doubles down as project manager. Whether you work on simple projects or industry monorepos, whether you're an open source developer or an enterprise user, Yarn has your back · First package manager built specifically ...
🌐
npm
npmjs.com › package › prettier-plugin-embed › v › latest
prettier-plugin-embed - npm
Description: Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the prettier-plugin-sh plugin.
      » npm install prettier-plugin-embed
    
Published   Feb 23, 2025
Version   0.5.0
Author   Ze-Zheng Wu
🌐
jsDelivr
jsdelivr.com › package › npm › prettier-plugin-sh
prettier-plugin-sh CDN by jsDelivr - A CDN for npm and GitHub
February 29, 2024 - A free, fast, and reliable CDN for prettier-plugin-sh. An opinionated `shellscript` formatter plugin for Prettier, also support simple format of `Dockerfile`, `properties`, `gitignore`, `dotenv`, `hosts`, `jvmoptions`...
Published   Oct 02, 2019
🌐
GitHub
github.com › un-ts › prettier
GitHub - un-ts/prettier: :package: Opinionated but Incredible Prettier plugins.
This repository is a monorepo managed by changesets what means we actually publish several packages to npm from same codebase, including: ... An opinionated shellscript formatter plugin for Prettier, also support simple format of Dockerfile, ...
Starred by 344 users
Forked by 31 users
Languages   TypeScript 98.4% | TypeScript 98.4%
🌐
Reddit
reddit.com › r/neovim › how to use plugins with prettierd, null-ls and lazy.nvim?
r/neovim on Reddit: how to use plugins with prettierd, null-ls and lazy.nvim?
March 17, 2024 -

Hi,

I tried to post this in the weekly thread, but I get errors. (I assume it is due to comment length, but there is literally just an empty error)

EDIT: I have solved the issue and every time I try to post the solution (either by editing or adding a comment) I get that same empty error from reddit. for solution, see 2 comments below.

I have null-ls setup to run prettierd for html files. (that works like a charm)
Now I would like it to format html files with go templates and it does not seem pick up my prettierd config in the root of my project:

// <project_root>/.prettierrc
{
	"plugins": ["prettier-plugin-go-template"],
	"overrides": [
		{
			"files": ["*.html"],
			"options": {
				"parser": "go-template",
			},
		},
	],
}  

NullLsInfo shows prettierd is active, but not the supported list is empty.
How do I make sure that the .prettierrc is used?
I used lazy.nvim to setup null-ls see setup below.

Any help would be appreciated

return {
	"jose-elias-alvarez/null-ls.nvim", -- configure formatters & linters
	event = { "BufReadPre", "BufNewFile" },
	config = function()
		-- import null-ls plugin
		local null_ls = require("null-ls")

		local null_ls_utils = require("null-ls.utils")

		-- for conciseness
		local formatting = null_ls.builtins.formatting -- to setup formatters
		local diagnostics = null_ls.builtins.diagnostics -- to setup linters

		-- to setup format on save
		local augroup = vim.api.nvim_create_augroup("LspFormatting", {})

		-- configure null_ls
		null_ls.setup({
			-- add package.json as identifier for root (for typescript monorepos)
			root_dir = null_ls_utils.root_pattern(".null-ls-root", "Makefile", ".git", "package.json"),
			-- setup formatters & linters
			sources = {
				--  to disable file types use
				--  "formatting.prettier.with({disabled_filetypes: {}})" (see null-ls docs)
				--formatting.prettier.with({
				--	extra_filetypes = { "svelte" },
				--}), -- js/ts formatter
				formatting.prettierd.with({
					filetypes = {
						"javascript",
						"javascriptreact",
						"typescript",
						"typescriptreact",
						"vue",
						"css",
						"scss",
						"less",
						"html",
						"json",
						"jsonc",
						"yaml",
						"markdown",
						"markdown.mdx",
						"graphql",
						"handlebars",
						"gotmpl",
					},
				}),
				formatting.stylua, -- lua formatter
				formatting.gofumpt, -- golang formatter
				-- formatting.goimports, -- golang imports
				diagnostics.eslint_d.with({ -- js/ts linter
					condition = function(utils)
						return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
					end,
				}),
			},
			-- configure format on save
			on_attach = function(current_client, bufnr)
				if current_client.supports_method("textDocument/formatting") then
					vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
					vim.api.nvim_create_autocmd("BufWritePre", {
						group = augroup,
						buffer = bufnr,
						callback = function()
							vim.lsp.buf.format({
								filter = function(client)
									--  only use null-ls for formatting instead of lsp server
									return client.name == "null-ls"
								end,
								bufnr = bufnr,
							})
						end,
					})
				end
			end,
		})
	end,
}
🌐
Npm
npm.io › package › prettier-plugin-sh
Prettier-plugin-sh NPM | npm.io
An opinionated shellscript formatter plugin for Prettier, also support simple format of Dockerfile, properties, gitignore, dotenv, hosts, jvmoptions...
🌐
GitHub
github.com › un-ts › prettier › issues › 340
prettier-plugin-sh: support .nvmrc files? · Issue #340 · un-ts/prettier
June 26, 2025 - Coming over here from prettier/prettier#15898 (comment): I'd like to use prettier-plugin-sh to format .nvmrc files. Given that the plugin supports similar files (gitignore, dotenv, ...), is thi...
Author   JoshuaKGoldberg