diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | doc/conform.txt | 1 | ||||
-rw-r--r-- | lua/conform/formatters/bsfmt.lua | 10 |
3 files changed, 13 insertions, 1 deletions
@@ -196,6 +196,7 @@ You can view this list in vim with `:help conform-formatters` - [blade-formatter](https://github.com/shufo/blade-formatter) - An opinionated blade template formatter for Laravel that respects readability. - [blue](https://github.com/grantjenks/blue) - The slightly less uncompromising Python code formatter. - [bpfmt](https://source.android.com/docs/setup/reference/androidbp) - Android Blueprint file formatter. +- [bsfmt](https://github.com/rokucommunity/brighterscript-formatter) - A code formatter for BrighterScript (and BrightScript). - [buf](https://buf.build/docs/reference/cli/buf/format) - A new way of working with Protocol Buffers. - [buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier) - buildifier is a tool for formatting bazel BUILD and .bzl files with a standard convention. - [cabal_fmt](https://hackage.haskell.org/package/cabal-fmt) - Format cabal files with cabal-fmt @@ -615,7 +616,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` \ @@ -634,6 +634,7 @@ Check if the buffer will use LSP formatting when lsp_format = "fallback" | 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 4d2c0b6..c52038e 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -234,6 +234,7 @@ FORMATTERS *conform-formatter respects readability. `blue` - The slightly less uncompromising Python code formatter. `bpfmt` - Android Blueprint file formatter. +`bsfmt` - A code formatter for BrighterScript (and BrightScript). `buf` - A new way of working with Protocol Buffers. `buildifier` - buildifier is a tool for formatting bazel BUILD and .bzl files with a standard convention. diff --git a/lua/conform/formatters/bsfmt.lua b/lua/conform/formatters/bsfmt.lua new file mode 100644 index 0000000..6f3b319 --- /dev/null +++ b/lua/conform/formatters/bsfmt.lua @@ -0,0 +1,10 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/rokucommunity/brighterscript-formatter", + description = "A code formatter for BrighterScript (and BrightScript).", + }, + command = "bsfmt", + args = { "$FILENAME", "--write" }, + stdin = false, +} |