Realtime index

Indexing

On opening an RST file in the VS Code editor, the ubCode language server walks up the directory tree until it finds a ubproject.toml file. The RST file is assigned to the ubproject.toml’s project and configuration.

The language server then indexes the RST file together with all other RST files of the same project. Any changes to the RST files are immediately reflected in the index on click of the refresh button:

The following sources are indexed:

Imported needs

Here’s how imported needs are displayed in the index view:

External needs

Here’s how external needs are displayed in the index view:

The indexer also supports massive project sizes. This gets possible by combining a very fast indexer together with an efficient caching strategy. Here’s a video of the indexer in action before any caches are built:

Large projects

The 2 projects have a size of 14.000 and 84.000 needs. This produces almost no load on the local machine. Restarting the language server or reloading the VS Code window comes at almost no cost.

Indexing errors

The indexer also detects and reports indexing errors in the index view such as duplicate IDs in the project. This considers RST files, imported needs and external needs:

Missing needimport or external need files are also reported.

Index View

The index view shows all indexed needs in a tree view. The fiels are grouped by type:

  • core options and extra options

  • outgoing links

  • incoming links

Select ID in index view