-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xbase not started #242
Comments
Hey @johntheocs, i don't see you calling the "setup" function in the Xbase config. Here is my lazy config, hopefully this can help: {
'xbase-lab/xbase',
dependencies = {
'neovim/nvim-lspconfig',
},
build = "make install",
config = function()
require 'xbase'.setup {
log_level = vim.log.levels.DEBUG,
simctl = {
iOS = {
"iPhone 15 Pro"
}
},
mappings = {
build_picker = 0,
run_picker = 0,
watch_picker = 0,
all_picker = 0,
toggle_split_log_buffer = 0,
toggle_vsplit_log_buffer = 0
}
}
end
}, Also, don't forget to set up sourcekit-lsp. Here is my lspconfig: lspconfig.sourcekit.setup {
capabilities = capabilities,
on_attach = function(arg1, arg2)
vim.keymap.set('n', '<leader>dp', require "xbase.pickers.builtin".actions, { desc = "XBase picker" })
vim.keymap.set('n', '<leader>dl', function()
require "xbase.logger".toggle(false, true)
end, { desc = "XBase logger" })
return on_attach(arg1, arg2)
end,
filetypes = { "swift" },
root_dir = lspconfig.util.root_pattern("*.xcodeproj", "*.xcworkspace", "Package.swift", ".git", "project.yml", "Project.swift"),
cmd = {
"xcrun",
"sourcekit-lsp",
"--log-level",
"debug"
}
} |
Thank you so much. You made my day! One more question, how can I use this plugin after all this configuration? |
@duggthangs , where do you put this codes? lspconfig.sourcekit.setup {
capabilities = capabilities,
on_attach = function(arg1, arg2)
vim.keymap.set('n', '<leader>dp', require "xbase.pickers.builtin".actions, { desc = "XBase picker" })
vim.keymap.set('n', '<leader>dl', function()
require "xbase.logger".toggle(false, true)
end, { desc = "XBase logger" })
return on_attach(arg1, arg2)
end,
filetypes = { "swift" },
root_dir = lspconfig.util.root_pattern("*.xcodeproj", "*.xcworkspace", "Package.swift", ".git", "project.yml", "Project.swift"),
cmd = {
"xcrun",
"sourcekit-lsp",
"--log-level",
"debug"
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used lazy.nvim to manage Xbase. It has been installed successfully.
When I enter ":Lazy," the following is the loaded plugins, and xbase is loaded.
However, when I open a Object C/Swift project directory, nothing happens. No Xbase related process. Also, there is no file named xbase.log in /tmp directory. Anything I missed?
Thanks
The text was updated successfully, but these errors were encountered: