Skip to content

Commit

Permalink
lsp(null_ls): register swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 14, 2024
1 parent c5afadd commit 9c0ce5d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/nxvim/lsp/plugins/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 9c0ce5d

Please sign in to comment.