-
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
No autocomplete suggestion #218
Comments
Hmmm I believe you haven't installed autocompletor? or which one are you using? For xbase to take over and configure the setup. You need to have a configuration defined in xbase opts:
|
I'm using lsp-zero.nvim which requires nvim-lspconfig and mason.nvim. |
Oh, my bad, actually try this:
|
That's what I did initially and it didn't work |
How did you setup the sourcekit-lsp? |
Well I have custom setup. I use cmp for completion which has it's own complex setup. hmm I guess maybe you are missing https://github.com/hrsh7th/cmp-nvim-lsp local dcapabilities = vim.lsp.protocol.make_client_capabilities()
local capabilities = vim.tbl_deep_extend("force", dcapabilities, {
offsetEncoding = { "utf-16" }, -- fix issue with null-ls and c servers
experimental = {
hoverActions = true,
hoverRange = true,
serverStatusNotification = true,
snippetTextEdit = true,
codeActionGroup = true,
ssr = true,
},
textDocument = {
completion = {
completionItem = {
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = false,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = { "additionalTextEdits", "documentation", "detail" },
},
},
},
},
})
|
cmp-nvim-lsp already comes with the lsp-zero setup that I have. The lsp works perfectly for other languages, it work for Swift too (without xbase installed). So I'm wondering if I might be doing anything wrong with my sourcekit-lsp setup that interfere with xbase. |
Here's what :LspInfo shows
Then, :LspLog shows this:
|
Nice that's a clear lead. I will look into it in few hours. Thanks |
For what it is worth I'm seeing the same problem
|
@rsdenijs can you give more information on your project? |
Yes, I am a regular neovim user and was playing around with xcode/swiftUI intro tutorials. I was trying to get some level of LSP working in neovim. |
Oh nice. You ain't using any type of xcodeproj generator just directly from xcode created. |
Correct. Just created the project in Xcode and trying to do some basic development on it in neovim. |
@kkharji Can you give your setup repos for example purpose, mate? I think my setup was failed and need some reference to make the plugin works. |
When I start nvim in a .xcodeproject root, xbase starts running, create the buildServer and .compile file and outputs to log as expected, but there was no autocomplete, not even for basic swift commands. When I deleted xbase and run Sourcekit-lsp on its own, the lsp was working fine, showing suggestions for swift commands and functions in that file (but not methods/classes from other files).
Here's my xbase config
My lsp config for sourcekit
When I run ~/.local/share/xbase/xbase it knows that I'm editing the file
And here's the xbase-build-server.log
Versions:
macOS 12.5.1
Xcode Version 14.1 (14B47b)
The text was updated successfully, but these errors were encountered: