From 617bc280561af618e5bfa8e86ee85f0594b3e807 Mon Sep 17 00:00:00 2001 From: Andrea C from The App <3269984+gacallea@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:51:45 +0100 Subject: [PATCH] fix(swift): fix LSP handler error (#655) fix(pack-swift): fix LSP handler error Co-authored-by: gacallea --- lua/astrocommunity/pack/swift/README.md | 22 ++++++++++++++-------- lua/astrocommunity/pack/swift/init.lua | 15 +++------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/lua/astrocommunity/pack/swift/README.md b/lua/astrocommunity/pack/swift/README.md index 4d59680ca..b7ba5a360 100644 --- a/lua/astrocommunity/pack/swift/README.md +++ b/lua/astrocommunity/pack/swift/README.md @@ -1,17 +1,23 @@ # Swift Language Pack -## Note: xbase is a WIP plugin, and the experience provided by this plugin might be lackluster +## Note -**Requirements:** +xbase is a WIP plugin, and the experience provided by this plugin might be +lackluster. -1. Make sure you have [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) installed on your machine. +## Requirements -2. Install Xcode Device Simulators: - To enable simulator functionality from within Neovim, you need to have Xcode Device Simulators installed on your machine. You can install these simulators from Xcode. +1. Make sure you have [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) + installed on your machine. -3. Mappings: - The default mappings for the xbase plugin overlap with AstroNvim's default. Therefore, you should set the mappings yourself. - Refer to [xBase](https://github.com/kkharji/xbase#neovim-3) documentation for more options. +2. Install Xcode Device Simulators: To enable simulator functionality from + within Neovim, you need to have Xcode Device Simulators installed on your +machine. You can install these simulators from Xcode. + +3. Mappings: The default mappings for the xbase plugin overlap with AstroNvim's + default. Therefore, you should set the mappings yourself. Refer to +[xBase](https://github.com/kkharji/xbase#neovim-3) documentation for more +options. ```lua opts = { diff --git a/lua/astrocommunity/pack/swift/init.lua b/lua/astrocommunity/pack/swift/init.lua index 237655a1d..76e1794dc 100644 --- a/lua/astrocommunity/pack/swift/init.lua +++ b/lua/astrocommunity/pack/swift/init.lua @@ -15,19 +15,9 @@ return { -- "nvim-lua/plenary.nvim", -- optional/requirement of telescope.nvim -- "stevearc/dressing.nvim", -- optional (in case you don't use telescope but something else) }, - init = function() require("astronvim.utils.lsp").setup "sourcekit-lsp" end, - }, - { - "jose-elias-alvarez/null-ls.nvim", - opts = function(_, opts) - local nls = require "null-ls" - if type(opts.sources) == "table" then - vim.list_extend(opts.sources, { - nls.builtins.formatting.swift_format, - }) - end - end, + init = function() require("astronvim.utils.lsp").setup "sourcekit" end, }, + { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) @@ -36,6 +26,7 @@ return { end end, }, + { "jay-babu/mason-nvim-dap.nvim", opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "codelldb") end,