diff options
author | christianchiarulli <[email protected]> | 2021-07-13 00:48:37 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-13 00:48:37 -0400 |
commit | eceb656b4bdcd5bb4050c1e2566e95f97b99e20e (patch) | |
tree | dfe178e1a6317d70f2daf5619a2d23e1cc33b1cf /ftplugin | |
parent | 4fad35a7e1a9d15317dada0625670707ffc5f9b0 (diff) |
poc with local prettier working
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/lua.lua | 16 |
1 files changed, 16 insertions, 0 deletions
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" |