lisp-sourcekit doesn't support LSP server of Xcode 11.4
webcpu opened this issue · 2 comments
Xcode 11.4 supports LSP server, however lsp-sourcekit doesn't support LSP server of Xcode 11.4. I have tried Sublime Text, it works like a charm. So I think it could be a bug of lsp-sourcekit.
I've updated the setup instructions for Xcode 11.4+ (https://github.com/emacs-lsp/lsp-sourcekit/blob/master/README.md). The fact that the language server is included with Xcode makes the process a bit simpler. Could you try configuring the extension again? If it fails, I'd need some more detail: Sample project you tried, what's happening exactly, etc.
Thanks a lot! I have changed the configuration according to the latest README, it works like a charm.
I have found the problem. I shouldn't use expand-file-name, I should use the path of sourcekit-lsp directly.
(use-package lsp-sourcekit
:after lsp-mode
:config
(setenv "SOURCEKIT_TOOLCHAIN_PATH" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
(setq lsp-sourcekit-executable (expand-file-name "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp")))