From de7ec62f5fde20ca1d7e53ed83a0077f8945f67c Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Wed, 14 Jul 2021 04:19:36 +0430 Subject: Added default formatters (#908) * added default formatters for a couple of langs * fix: sugesstions from tastyep * allow users to change default formatters * suggestion: mellow pointed out the telescope issue * we don't need to use formatter.setup --- ftplugin/ruby.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ftplugin/ruby.lua') diff --git a/ftplugin/ruby.lua b/ftplugin/ruby.lua index 7f86ffb9..ff7e7c8b 100644 --- a/ftplugin/ruby.lua +++ b/ftplugin/ruby.lua @@ -1,3 +1,17 @@ +O.formatters.filetype["ruby"] = { + function() + return { + exe = O.lang.ruby.formatter.exe, + args = O.lang.ruby.formatter.args, + stdin = not (O.lang.ruby.formatter.stdin ~= nil), + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} if require("lv-utils").check_lsp_client_active "solargraph" then return end -- cgit v1.2.3