emacs-lsp / lsp-sourcekit

lsp-mode :heart: Apple's sourcekit
https://emacs-lsp.github.io/lsp-sourcekit
GNU General Public License v3.0
103 stars 13 forks source link

"could not open compilation database for /path/to/Foo.swift" #3

Open dabrahams opened 5 years ago

dabrahams commented 5 years ago

I can only get lsp-sourcekit to give me the following in *Messages* buffer:

could not find manifest, or not a SwiftPM package: /path/to/current/directory
could not open compilation database for /path/to/current/directory/Foo.swift [3 times]

Do I need to have a SwiftPM package for my project in order to do anything?

danielmartin commented 5 years ago

Yes, for now sourcekit-lsp requires a Swift PM package that provides the necessary compile flags. The second warning can be ignored for Swift projects. It only applies to projects that provide compilation flags using a compilation database (https://clang.llvm.org/docs/JSONCompilationDatabase.html).

charshep commented 4 years ago

I'm trying to get this working with Xcode 11.4 and I'm seeing the same errors. Is it still the case that lsp-sourcekit only works for projects that have a Swift PM package? If so, perhaps the quickstart guide should indicate that.

I do seem to have things working in a sample project (SourceKittenDaemon actually) that has a PM package. Hoping to get this working for an existing iOS project for which this is not the case. Looks promising so far, thank you!