diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lua/conform/formatters/styler.lua | 11 |
2 files changed, 12 insertions, 0 deletions
@@ -257,6 +257,7 @@ You can view this list in vim with `:help conform-formatters` - [standardjs](https://standardjs.com) - JavaScript Standard style guide, linter, and formatter. - [standardrb](https://github.com/standardrb/standard) - Ruby's bikeshed-proof linter and formatter. - [stylelint](https://github.com/stylelint/stylelint) - A mighty CSS linter that helps you avoid errors and enforce conventions. +- [styler](https://github.com/devOpifex/r.nvim) - A formatter for the R programming language. - [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/styler.lua b/lua/conform/formatters/styler.lua new file mode 100644 index 0000000..d9052c1 --- /dev/null +++ b/lua/conform/formatters/styler.lua @@ -0,0 +1,11 @@ +local util = require("conform.util") +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/devOpifex/r.nvim", + description = "R formatter and linter.", + }, + command = util.find_executable({ "usr/bin/" }, "R"), + args = { "-s", "-e", "r.nvim::format()", "--args", "$FILENAME" }, + stdin = false, +} |