aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/prime_caches.rs
Commit message (Collapse)AuthorAgeFilesLines
* Syntactic highlighting of NAME_REF for injectionsLeander Tentrup2020-06-151-1/+1
| | | | | | This commit adds a function that tries to determine the syntax highlighting class of NAME_REFs based on the usage. It is used for highlighting injections (such as highlighting of doctests) as the semantic logic will most of the time result in unresolved references. It also adds a color to unresolved references in HTML encoding.
* main: eagerly prime goto-definition cachesAndrew Gallant2020-04-251-4/+1
| | | | | | | | | | | | | | | This commit makes RA more aggressive about eagerly priming the caches. In particular, this fixes an issue where even after RA was done priming its caches, an initial goto-definition request would have very high latency. This fixes that issue by requesting syntax highlighting for everything. It is presumed that this is a tad wasteful, but not overly so. This commit also tweaks the logic that determines when the cache is primed. Namely, instead of just priming it when the state is loaded initially, we attempt to prime it whenever some state changes. This fixes an issue where if a modification notification is seen before cache priming is done, it would stop the cache priming early.
* Prime open files on loadAleksey Kladov2020-03-051-0/+15