diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-27 10:56:06 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-27 10:56:06 +0100 |
commit | 0d1c6076073c73f57340e256dc25da9d37311ef0 (patch) | |
tree | 60ff1f4a42f8ef297c07d5716af67e3057c8e1bd /editors/code/src/config.ts | |
parent | 4b48cff022a1606bde596f01fbf44361640b10d8 (diff) | |
parent | 1e6ba1901550fb1610a1a464c48ec358cd3c339c (diff) |
Merge #1319
1319: Rainbow highlighting spike 🌈 r=killercup a=killercup
Very simple approach: For each identifier, set the hash of the range
where it's defined as its 'id' and use it in the VSCode extension to
generate unique colors.
Thus, the generated colors are per-file. They are also quite fragile,
and I'm not entirely sure why. Looks like we need to make sure the
same ranges aren't overwritten by a later request?
Co-authored-by: Pascal Hertleif <[email protected]>
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 481a5e5f1..8d73a6b34 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -15,6 +15,7 @@ export interface CargoWatchOptions { | |||
15 | 15 | ||
16 | export class Config { | 16 | export class Config { |
17 | public highlightingOn = true; | 17 | public highlightingOn = true; |
18 | public rainbowHighlightingOn = false; | ||
18 | public enableEnhancedTyping = true; | 19 | public enableEnhancedTyping = true; |
19 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; | 20 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; |
20 | public showWorkspaceLoadedNotification = true; | 21 | public showWorkspaceLoadedNotification = true; |
@@ -39,6 +40,12 @@ export class Config { | |||
39 | this.highlightingOn = config.get('highlightingOn') as boolean; | 40 | this.highlightingOn = config.get('highlightingOn') as boolean; |
40 | } | 41 | } |
41 | 42 | ||
43 | if (config.has('rainbowHighlightingOn')) { | ||
44 | this.rainbowHighlightingOn = config.get( | ||
45 | 'rainbowHighlightingOn' | ||
46 | ) as boolean; | ||
47 | } | ||
48 | |||
42 | if (config.has('showWorkspaceLoadedNotification')) { | 49 | if (config.has('showWorkspaceLoadedNotification')) { |
43 | this.showWorkspaceLoadedNotification = config.get( | 50 | this.showWorkspaceLoadedNotification = config.get( |
44 | 'showWorkspaceLoadedNotification' | 51 | 'showWorkspaceLoadedNotification' |