summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--lua/conform/formatters/biome.lua10
-rw-r--r--lua/conform/formatters/codespell.lua14
-rw-r--r--lua/conform/formatters/markdownlint.lua10
-rw-r--r--lua/conform/formatters/stylelint.lua10
5 files changed, 48 insertions, 0 deletions
diff --git a/README.md b/README.md
index d334d70..f517474 100644
--- a/README.md
+++ b/README.md
@@ -160,10 +160,12 @@ To view configured and available formatters, as well as to see the path to the l
- [autopep8](https://github.com/hhatto/autopep8) - A tool that automatically formats Python code to conform to the PEP 8 style guide.
- [beautysh](https://github.com/lovesegfault/beautysh) - A Bash beautifier for the masses.
- [black](https://github.com/psf/black) - The uncompromising Python code formatter.
+- [biome](https://github.com/biomejs/biome) - A toolchain for web projects, aimed to provide functionalities to maintain them.
- [buf](https://buf.build/docs/lint/overview) - A new way of working with Protocol Buffers
- [clang_format](https://www.kernel.org/doc/html/latest/process/clang-format.html) - Tool to format C/C++/… code according to a set of rules and heuristics.
- [cljstyle](https://github.com/greglook/cljstyle) - Formatter for Clojure code.
- [cmake_format](https://github.com/cheshirekow/cmake_format) - Parse cmake listfiles and format them nicely.
+- [codespell](https://github.com/codespell-project/codespell) - Check code for common misspellings.
- [dart_format](https://dart.dev/tools/dart-format) - Replace the whitespace in your program with formatting that follows Dart guidelines.
- [deno_fmt](https://deno.land/manual/tools/formatter) - Use [Deno](https://deno.land/) to format TypeScript, JavaScript/JSON and markdown.
- [dfmt](https://github.com/dlang-community/dfmt) - Formatter for D source code.
@@ -180,6 +182,7 @@ To view configured and available formatters, as well as to see the path to the l
- [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) - A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
- [isort](https://github.com/PyCQA/isort) - Python utility / library to sort imports alphabetically and automatically separate them into sections and by type.
- [jq](https://github.com/stedolan/jq) - Command-line JSON processor.
+- [markdownlint](https://github.com/DavidAnson/markdownlint) - A Node.js style checker and lint tool for Markdown/CommonMark files.
- [latexindent](https://github.com/cmhughes/latexindent.pl) - A perl script for formatting LaTeX files that is generally included in major TeX distributions.
- [nixfmt](https://github.com/serokell/nixfmt) - nixfmt is a formatter for Nix code, intended to apply a uniform style.
- [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) - nixpkgs-fmt is a Nix code formatter for nixpkgs.
@@ -196,6 +199,7 @@ To view configured and available formatters, as well as to see the path to the l
- [shellharden](https://github.com/anordal/shellharden) - The corrective bash syntax highlighter
- [shfmt](https://github.com/mvdan/sh) - A shell parser, formatter, and interpreter with `bash` support.
- [sql_formatter](https://github.com/sql-formatter-org/sql-formatter) - A whitespace formatter for different query languages.
+- [stylelint](https://github.com/stylelint/stylelint) - A mighty CSS linter that helps you avoid errors and enforce conventions.
- [stylua](https://github.com/JohnnyMorganz/StyLua) - An opinionated code formatter for Lua.
- [swift_format](https://github.com/apple/swift-format) - Swift formatter from apple. Requires building from source with `swift build`.
- [swiftformat](https://github.com/nicklockwood/SwiftFormat) - SwiftFormat is a code library and command-line tool for reformatting `swift` code on macOS or Linux.
diff --git a/lua/conform/formatters/biome.lua b/lua/conform/formatters/biome.lua
new file mode 100644
index 0000000..f6d6ae8
--- /dev/null
+++ b/lua/conform/formatters/biome.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/biomejs/biome",
+ description = "A toolchain for web projects, aimed to provide functionalities to maintain them.",
+ },
+ command = "biome",
+ stdin = true,
+ args = { "format", "--stdin-file-path", "$FILENAME" },
+}
diff --git a/lua/conform/formatters/codespell.lua b/lua/conform/formatters/codespell.lua
new file mode 100644
index 0000000..ca07415
--- /dev/null
+++ b/lua/conform/formatters/codespell.lua
@@ -0,0 +1,14 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/codespell-project/codespell",
+ description = "Check code for common misspellings.",
+ },
+ command = "codespell",
+ stdin = false,
+ args = {
+ "$FILENAME",
+ "--write-changes",
+ "--check-hidden", -- conform's temp file is hidden
+ },
+}
diff --git a/lua/conform/formatters/markdownlint.lua b/lua/conform/formatters/markdownlint.lua
new file mode 100644
index 0000000..654a603
--- /dev/null
+++ b/lua/conform/formatters/markdownlint.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/DavidAnson/markdownlint",
+ description = "A Node.js style checker and lint tool for Markdown/CommonMark files.",
+ },
+ command = "markdownlint",
+ args = { "--fix", "$FILENAME" },
+ stdin = false,
+}
diff --git a/lua/conform/formatters/stylelint.lua b/lua/conform/formatters/stylelint.lua
new file mode 100644
index 0000000..3d8361d
--- /dev/null
+++ b/lua/conform/formatters/stylelint.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/stylelint/stylelint",
+ description = "A mighty CSS linter that helps you avoid errors and enforce conventions.",
+ },
+ command = "stylelint",
+ args = { "--stdin", "--fix" },
+ stdin = true,
+}