aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform
diff options
context:
space:
mode:
authorJohn Coene <jcoenep@gmail.com>2023-11-10 16:10:51 +0100
committerGitHub <noreply@github.com>2023-11-10 07:10:51 -0800
commit6afc64e9f36cbae35c2a8b6852d0b91c9807a72a (patch)
tree0a12451a46a06258e8bdc72aa06fe6ef5fbe147c /lua/conform
parentc3447c0080f4d6a94917b6eefa2dbdcac63dbfcc (diff)
feat: add styler formatter for R (#184)
* feat: add styler formatter for R * fix: do not run --vanilla to pick up options * docs: add to README * fix: std in false * fix: do not hardcode style, use config file * fix: lint styler formatter
Diffstat (limited to 'lua/conform')
-rw-r--r--lua/conform/formatters/styler.lua11
1 files changed, 11 insertions, 0 deletions
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,
+}