summaryrefslogtreecommitdiff
path: root/ftplugin/lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/lua.lua')
-rw-r--r--ftplugin/lua.lua20
1 files changed, 3 insertions, 17 deletions
diff --git a/ftplugin/lua.lua b/ftplugin/lua.lua
index 8305dc2c..b098a77d 100644
--- a/ftplugin/lua.lua
+++ b/ftplugin/lua.lua
@@ -1,11 +1,9 @@
O.formatters.filetype["lua"] = {
- -- prettier
function()
return {
- exe = "stylua",
- -- TODO: append to this for args don't overwrite
- args = {},
- stdin = false,
+ exe = O.lang.lua.formatter.exe,
+ args = O.lang.lua.formatter.args,
+ stdin = not (O.lang.lua.formatter.stdin ~= nil),
}
end,
}
@@ -48,16 +46,4 @@ if not require("lv-utils").check_lsp_client_active "sumneko_lua" then
}
end
-if O.lang.lua.autoformat then
- require("lv-utils").define_augroups {
- _lua_autoformat = {
- {
- "BufWritePre",
- "*.lua",
- "lua vim.lsp.buf.formatting_sync(nil, 1000)",
- },
- },
- }
-end
-
vim.cmd "setl ts=2 sw=2"