aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/csharpier.lua10
3 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 3a6373a..593fd25 100644
--- a/README.md
+++ b/README.md
@@ -190,6 +190,7 @@ You can view this list in vim with `:help conform-formatters`
- [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.
+- [csharpier](https://github.com/belav/csharpier) - An opinionated C# formatter.
- [darker](https://github.com/akaihola/darker) - Run black only on changed lines.
- [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.
@@ -494,7 +495,6 @@ Retrieve the available formatters for a buffer
`list_all_formatters(): conform.FormatterInfo[]` \
List information about all filetype-configured formatters
-
### get_formatter_info(formatter, bufnr)
`get_formatter_info(formatter, bufnr): conform.FormatterInfo` \
@@ -513,6 +513,7 @@ Check if the buffer will use LSP formatting when lsp_fallback = true
| Param | Type | Desc |
| ------- | ------------ | ------------------------------------ |
| options | `nil\|table` | Options passed to vim.lsp.buf.format |
+
<!-- /API -->
## Acknowledgements
diff --git a/doc/conform.txt b/doc/conform.txt
index 82d7bea..ac59230 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -180,6 +180,7 @@ FORMATTERS *conform-formatter
`cljstyle` - Formatter for Clojure code.
`cmake_format` - Parse cmake listfiles and format them nicely.
`codespell` - Check code for common misspellings.
+csharpier - An opinionated C# formatter.
`darker` - Run black only on changed lines.
`dart_format` - Replace the whitespace in your program with formatting that
follows Dart guidelines.
diff --git a/lua/conform/formatters/csharpier.lua b/lua/conform/formatters/csharpier.lua
new file mode 100644
index 0000000..50258e0
--- /dev/null
+++ b/lua/conform/formatters/csharpier.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/belav/csharpier",
+ description = "The opinionated C# code formatter",
+ },
+ command = "dotnet-csharpier",
+ args = { "--write-stdout" },
+ stdin = true,
+}