Skip to content
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

Cannot get TabNine to work with cquery #119

Closed
Levi-Lesches opened this issue Aug 1, 2019 · 5 comments
Closed

Cannot get TabNine to work with cquery #119

Levi-Lesches opened this issue Aug 1, 2019 · 5 comments

Comments

@Levi-Lesches
Copy link

So I installed cquery (MAN was that painful -- I've never used cmake) and have it in my PATH.

I type in the following:
cquery --init={\"cacheDirectory\":\"C:\\Users\\path\\to\\my\\project\\.cquery_cache\"}

and get this:
{"jsonrpc":"2.0","method":"$cquery/progress","params":{"indexRequestCount":0,"doIdMapCount":0,"onIdMappedCount":0,"onIndexedCount":0,"activeThreads":0}}

So I know I installed it right. But TabNine keeps compaining it cannot reach the backend, even after running TabNine::restart and closing Sublime Text completely. I noticed there was a space in the JSON in the example .toml file, so I copied-and-pasted it without the space into my own .toml (note that I already got Python and Dart working so I know how to use the toml)

I was able to get it working by replacing ${project_root} with the full path with 4 backslashes each -- two to escape past Sublime Text, and two to escape past the command line tool. However, once I replaced it with ${project_path} again, it failed. I assume this means that ${project_path} only has two backslashes. How can I change this? And are there any sort of logs I can use to see what's going on (the specific error)? I am using Package Resource Viewer and couldn't find much relating to executing commands in the .toml file

@lalten
Copy link

lalten commented Aug 3, 2019

@Levi-Lesches do you have a .git dir in your project directory? this did the trick for me (see referenced issue above).

@Levi-Lesches
Copy link
Author

Oh I didn't see this, thanks for the advice. No I don't appear to (that's odd, how is git even working then? git status runs OK...), but to solve this problem I just set the cache directory to some folder independent of the project, since I would like recommendations that are relevant to all my projects. I figured it would be fine since other languages (eg, Python and Dart) don't have a project-specific folder and they work just fine.

@Levi-Lesches
Copy link
Author

Well actually after running git init like you did, it said Reinitialized, which made me look for the .git even harder. Apparently, it's a hidden folder, so I probably did have it I just didn't see it. Which makes sense, since, again, I was using git extensively.

I'm not really sure what the problem is, I can try digging around once I have time

@JanPokorny
Copy link

There's a pull request #163 to use clangd instead of cquery. I'm not sure why cquery was chosen in the first place, as clangd has much better support and works out of the box (without supplying any arguments). Furthermore many C++ programmers have Clang/LLVM suite already installed.

@amircodota
Copy link
Contributor

PR 163 was merged and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants