From 6afc64e9f36cbae35c2a8b6852d0b91c9807a72a Mon Sep 17 00:00:00 2001 From: John Coene Date: Fri, 10 Nov 2023 16:10:51 +0100 Subject: 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 --- lua/conform/formatters/styler.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lua/conform/formatters/styler.lua (limited to 'lua/conform/formatters/styler.lua') 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, +} -- cgit v1.2.3-70-g09d2