Giter Site home page Giter Site logo

HOWTO: Programmatically pre-index? about ccls HOT 5 CLOSED

maskray avatar maskray commented on August 22, 2024
HOWTO: Programmatically pre-index?

from ccls.

Comments (5)

MaskRay avatar MaskRay commented on August 22, 2024

ccls starts indexing the whole project (with compile_commands.json or hierarchical .ccls) after it received the initialize request telling it where the project resides. When you open the first file in your editor, the indexer threads are working in the background, while the main thread is serving requests from the language client plugin.

If you want to have headless indexing, you may use some specialized language client to just send an initialize request then wait.

I'd like to precompile

This is usually unnecessary because the main thread can still serve requests before the indexing is finished. The index will also be updated automatically when you save a file in your editor (textDocument/didSave triggers re-indexing of that file).

Also I'm not sure how dereferencing would work adhoc.

Sorry I don't understand your question.

from ccls.

dakami avatar dakami commented on August 22, 2024

I had thought dereferencing type definitions required a global view of the codebase in order to be accurate. Is that not the case?

Will initialize return when indexing is complete?

from ccls.

MaskRay avatar MaskRay commented on August 22, 2024

from ccls.

MaskRay avatar MaskRay commented on August 22, 2024

I have added some description to README.md

It starts indexing the whole project (including subprojects if exist) parallelly when you open the first file, while the main thread can serve requests before the indexing is complete.
Saving files will incrementally update the index.

from ccls.

MaskRay avatar MaskRay commented on August 22, 2024

Also check out #98 for the standalone indexing mode -index

from ccls.

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.