Default index-store-path?

I've set up Sublime Text 3 to talk to sourcekit-lsp, and by having CMake generate the compilation database everything is working fine, but from what I understand from the README in the repo one can have clang generate the needed into directly into an index-db. The question is, what's sourcekit-lsp's default index-store-path, that I then pass to clang so the two share the same db?

Or is there none, and I need to tell Sublime's LSP package to pass the same index-store-path to sourcekit-lsp as I then do for my external CMake build?

Correct, as long as you are using a clang built from https://github.com/apple/llvm-project such as the one included in swift.org toolchains.

The question is, what's sourcekit-lsp's default index-store-path, that I then pass to clang so the two share the same db?

Or is there none, and I need to tell Sublime's LSP package to pass the same index-store-path to sourcekit-lsp as I then do for my external CMake build?

SourceKit-LSP will automatically search your compilation database to find the index store path that is passed to clang, so normally you would configure your cmake invocation to add the -index-store-path option, and then sourcekit-lsp would figure it out automatically. lf you need to override what is in the compilation database, you can pass -index-store-path to sourcekit-lsp itself.

Terms of Service

Privacy Policy

Cookie Policy