From eceb656b4bdcd5bb4050c1e2566e95f97b99e20e Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Tue, 13 Jul 2021 00:48:37 -0400 Subject: poc with local prettier working --- ftplugin/lua.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ftplugin/lua.lua') diff --git a/ftplugin/lua.lua b/ftplugin/lua.lua index 2ffaa472..8305dc2c 100644 --- a/ftplugin/lua.lua +++ b/ftplugin/lua.lua @@ -1,3 +1,19 @@ +O.formatters.filetype["lua"] = { + -- prettier + function() + return { + exe = "stylua", + -- TODO: append to this for args don't overwrite + args = {}, + stdin = false, + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} if not require("lv-utils").check_lsp_client_active "sumneko_lua" then -- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) local sumneko_root_path = DATA_PATH .. "/lspinstall/lua" -- cgit v1.2.3