diff --git a/lua/nxvim/lsp/plugins/null-ls.lua b/lua/nxvim/lsp/plugins/null-ls.lua index 7eeaba2..0efef8e 100644 --- a/lua/nxvim/lsp/plugins/null-ls.lua +++ b/lua/nxvim/lsp/plugins/null-ls.lua @@ -39,6 +39,17 @@ null_ls.register({ }), }) +null_ls.register({ + name = "swiftformat", + method = null_ls.methods.FORMATTING, + filetypes = { "swift" }, + generator = null_ls.formatter({ + command = "swiftformat", + args = { "--indent", "tabs", "$FILENAME" }, + to_temp_file = true, + }), +}) + -- { == Configuration ==> ===================================================== null_ls.setup({