Skip to content

Commit

Permalink
fix(swift): fix LSP handler error (#655)
Browse files Browse the repository at this point in the history
fix(pack-swift): fix LSP handler error

Co-authored-by: gacallea <[email protected]>
  • Loading branch information
andreacfromtheapp and gacallea authored Nov 30, 2023
1 parent 1df076d commit 617bc28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
22 changes: 14 additions & 8 deletions lua/astrocommunity/pack/swift/README.md
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
15 changes: 3 additions & 12 deletions lua/astrocommunity/pack/swift/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 617bc28

Please sign in to comment.