diff --git a/lua/plugins/swift.lua b/lua/plugins/swift.lua new file mode 100644 index 0000000..0a4a92b --- /dev/null +++ b/lua/plugins/swift.lua @@ -0,0 +1,29 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "swift" } }, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + sourcekit = { + -- sourcekit-lsp ships with Xcode and the Swift toolchain, not Mason. + mason = false, + -- lspconfig also lists C, C++ and Objective-C, which clangd handles. + filetypes = { "swift" }, + }, + }, + }, + }, + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + -- Runs `swift format` from the toolchain; the standalone + -- swift-format binary isn't on PATH. + swift = { "swift" }, + }, + }, + }, +}