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/python.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ftplugin/python.lua') diff --git a/ftplugin/python.lua b/ftplugin/python.lua index d6b98116..d2ade7e2 100644 --- a/ftplugin/python.lua +++ b/ftplugin/python.lua @@ -1,3 +1,18 @@ +O.formatters.filetype["python"] = { + function() + return { + exe = O.lang.python.formatter.exe, + args = O.lang.python.formatter.args, + stdin = not (O.lang.python.formatter.stdin ~= nil), + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} + local python_arguments = {} -- TODO: replace with path argument -- cgit v1.2.3