Closed kkharji closed 1 year ago
This works for my config (I set up sourcekit separately), but if I try to instead set up sourcekit using the xbase setup...
require("xbase").setup({
sourcekit = {
root_dir = require("lspconfig.util").root_pattern(
"Package.swift",
"*.xcodeproj",
".git"
),
},
mappings = { enable = false },
})
...the language server doesn't attach:
Press q or <Esc> to close this window. Press <Tab> to view server doc.
Language client log: /Users/garrett/.local/state/nvim/lsp.log
Detected filetype: swift
1 client(s) attached to this buffer:
Client: null-ls (id: 1, bufnr: [2])
filetypes: fish, swift, python
autostart: false
root directory: /Users/garrett/dev/scrap/xbase_repro
cmd: <function>
Other clients that match the filetype: swift
Config: sourcekit
filetypes: swift
root directory: /Users/garrett/dev/scrap/xbase_repro
cmd: /usr/bin/sourcekit-lsp --log-level error
cmd is executable: true
autostart: true
custom handlers:
Configured servers list: bashls, ruby_ls, dockerls, rust_analyzer, lua_ls, taplo, tsserver, pyright, teal_ls, jsonls, emmet_ls, gopls, vimls, sourcekit, yamlls, marksman
I don't know if this is something specific to my config though.
Apologies! I can also reproduce the issue with it not attaching using the master branch as well. 😅
Any blockers on this?
@heygarrett Nope waiting for you to confirm by default it doesn't set sourcekit and when it set to empty table it runs sourcekit.
Oh! Sorry, should I should have been more clear in my initial comments.
by default it doesn't set sourcekit
Confirmed! No mention of sourcekit when running :LspInfo
inside an Xcode project.
when it set to empty table it runs sourcekit
It does not. But running :LspInfo
does list sourcekit under Other clients that match the filetype: swift
(this is also the case when using the master branch of xbase).
@heygarrett test this and let me know if it checks out with. Thanks