diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-23 13:52:59 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-23 13:52:59 +0100 |
commit | c290bb0749c14409cbab657e12123320176a33e5 (patch) | |
tree | 72f4f2b23092cebb2632ee430bf29ab69c6d53f1 /editors/code/src/highlighting.ts | |
parent | 44665685257f18d182ab116855dd9e8b054c49da (diff) | |
parent | f1ec88cc56c0bb24c56e6f9f898ac567ce34c79f (diff) |
Merge #1305
1305: Try to resolve name refs during highlighting r=matklad a=lnicola
Preview:
![image](https://user-images.githubusercontent.com/308347/58253075-43464a80-7d70-11e9-84cc-e81990f2d3eb.png)
This is probably not the cleanest implementation, but it's not clear to me what parts of `reference_definition` we don't want to run at this point. Also, is the `SourceAnalyzer` cheap enough to construct for each `NameRef`? Not like there's any alternative at this point, though.
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'editors/code/src/highlighting.ts')
-rw-r--r-- | editors/code/src/highlighting.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index e1a68544a..8389d94b8 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts | |||
@@ -33,11 +33,16 @@ export class Highlighter { | |||
33 | colorContrib('keyword.unsafe'), | 33 | colorContrib('keyword.unsafe'), |
34 | colorContrib('function'), | 34 | colorContrib('function'), |
35 | colorContrib('parameter'), | 35 | colorContrib('parameter'), |
36 | colorContrib('constant'), | ||
37 | colorContrib('type'), | ||
36 | colorContrib('builtin'), | 38 | colorContrib('builtin'), |
37 | colorContrib('text'), | 39 | colorContrib('text'), |
38 | colorContrib('attribute'), | 40 | colorContrib('attribute'), |
39 | colorContrib('literal'), | 41 | colorContrib('literal'), |
40 | colorContrib('macro') | 42 | colorContrib('macro'), |
43 | colorContrib('variable'), | ||
44 | colorContrib('field'), | ||
45 | colorContrib('module') | ||
41 | ]; | 46 | ]; |
42 | 47 | ||
43 | return new Map<string, vscode.TextEditorDecorationType>(decorations); | 48 | return new Map<string, vscode.TextEditorDecorationType>(decorations); |