diff options
author | Abouzar Parvan <[email protected]> | 2021-07-14 04:19:36 +0430 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-13 19:49:36 -0400 |
commit | de7ec62f5fde20ca1d7e53ed83a0077f8945f67c (patch) | |
tree | 1d54b2232489e53a98025825ed550c28e7adea95 /ftplugin/python.lua | |
parent | 6bbc082f5758cdb57ecb25f270e5558ab63d3754 (diff) |
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
Diffstat (limited to 'ftplugin/python.lua')
-rw-r--r-- | ftplugin/python.lua | 15 |
1 files changed, 15 insertions, 0 deletions
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 |