Coder Social home page Coder Social logo

Comments (4)

lalten avatar lalten commented on August 19, 2024 4

Aha, apparently TabNine will only detect a project_root if there is a .tabnine_root or .git: codota/TabNine#5

a git init in /tmp/vscode-tabnine actually did the trick ๐Ÿ˜†

If this is intended behaviour, it should clearly be mentioned somewhere in TabNine's docs.

from tabnine-vscode.

lalten avatar lalten commented on August 19, 2024

I just tried with ccls and it has a similar error:

...
[2019-08-03][13:43:01][lsp::language_server_transport][INFO] Starting language server: `ccls --init={"cacheDirectory":"${project_root}/.ccls"}`
...
[2019-08-03][13:44:24][lsp::language_server_transport][ERROR] Language server error:
  13:43:02 ccls initialize.cc:272 I initialize in directory /tmp/vscode-tabnine/myfile.cpp with uri file:///tmp/vscode-tabnine/myfile.cpp
  13:43:02 ccls initialize.cc:295 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":".ccls-cache","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"diagnosticsRelatedInformation":true,"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100},"diagnostics":{"blacklist":[],"onChange":1000,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":0,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
  13:43:02 ccls initialize.cc:324 I use -resource-dir=/usr/lib/llvm-8/lib/clang/8.0.1
  13:43:02 ccls initialize.cc:359 I workspace folder: /tmp/vscode-tabnine/myfile.cpp/ -> /tmp/vscode-tabnine/myfile.cpp//
  13:43:02 ccls initialize.cc:382 I start 4 indexers
  13:43:02 ccls initialize.cc:390 I dispatch initial index requests
  13:43:02 ccls pipeline.cc:485 I loaded project. Refresh semantic highlight for all working file.
  13:43:02 indexer0 pipeline.cc:351 I parse /tmp/vscode-tabnine/myfile.cpp
  13:43:02 preamble sema_manager.cc:743 I create session for /tmp/vscode-tabnine/myfile.cpp
  13:43:02 indexer0 pipeline.cc:389 I store index for /tmp/vscode-tabnine/myfile.cpp (delta: 0)
  13:43:02 indexer0 utils.cc:185 E failed to write to /tmp/vscode-tabnine/myfile.cpp/.ccls-cache/@@tmp@[email protected]/@tmp@[email protected] Not a directory
  13:43:02 indexer0 utils.cc:185 E failed to write to /tmp/vscode-tabnine/myfile.cpp/.ccls-cache/@@tmp@[email protected]/@tmp@[email protected] Not a directory

(formatting by me)

from tabnine-vscode.

lalten avatar lalten commented on August 19, 2024

I have the impression that the ${project_root} variable doesn't correctly expand when starting the server. That would explain why it tries to "initialize in directory /tmp/vscode-tabnine/myfile.cpp", which is not a directory but a file. Of course this won't work.

Where, and to what value is ${project_root} set? I tried to change the toml to use vscode's ${workspaceFolder}, but that didn't help and I'm not sure it would work anywhere outside launch.json and tasks.json files...

Also see codota/TabNine#119, which seems to be related

from tabnine-vscode.

stale avatar stale commented on August 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from tabnine-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.