Skip to content

Commit

Permalink
feat(programming-language-support): Add xbase (#671)
Browse files Browse the repository at this point in the history
* feat(xcode): Add XBase

* fix(main): Move xbase to programing-language-support folder

---------

Co-authored-by: gacallea <[email protected]>
Co-authored-by: Uzair Aftab <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2023
1 parent cfe5e3f commit e5ddf96
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
38 changes: 38 additions & 0 deletions lua/astrocommunity/programming-language-support/xbase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# XBase

## Note

xbase is a WIP plugin, and the experience provided by this plugin might be
lackluster.

## Requirements

1. Make sure you have [sourcekit-lsp](https://github.com/apple/sourcekit-lsp)
installed on your machine.

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 = {
-- ... (other options)

mappings = {
enable = true,
build_picker = "<leader>rb", -- Set to 0 to disable
run_picker = "<leader>ra", -- Set to 0 to disable
watch_picker = 0, -- Set to 0 to disable
all_picker = 0, -- Set to 0 to disable
toggle_split_log_buffer = 0,
toggle_vsplit_log_buffer = "<leader>rs",
},

-- ... (other options)
}
```
28 changes: 28 additions & 0 deletions lua/astrocommunity/programming-language-support/xbase/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local utils = require "astronvim.utils"

return {
{
"xbase-lab/xbase",
ft = { "swift", "objcpp", "objc" },
run = "make install",
dependencies = {
"neovim/nvim-lspconfig",
{ "nvim-telescope/telescope.nvim", optional = true },
{ "nvim-lua/plenary.nvim", optional = true },
{ "stevearc/dressing.nvim", optional = true }, -- (in case you don't use telescope but something else)
},
init = function() require("astronvim.utils.lsp").setup "sourcekit" end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "swift")
end
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "codelldb") end,
},
}

0 comments on commit e5ddf96

Please sign in to comment.