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/dart.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/dart.lua')
-rw-r--r-- | ftplugin/dart.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ftplugin/dart.lua b/ftplugin/dart.lua index a0de0fd5..f9b68e9d 100644 --- a/ftplugin/dart.lua +++ b/ftplugin/dart.lua @@ -1,3 +1,17 @@ +O.formatters.filetype["dart"] = { + function() + return { + exe = O.lang.dart.formatter.exe, + args = O.lang.dart.formatter.args, + stdin = not (O.lang.dart.formatter.stdin ~= nil), + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} if require("lv-utils").check_lsp_client_active "dartls" then return end |