Merge branch 'main' into request-to-join-project
This commit is contained in:
commit
225536accc
59 changed files with 3330 additions and 7719 deletions
35
Cargo.lock
generated
35
Cargo.lock
generated
|
@ -876,6 +876,7 @@ dependencies = [
|
||||||
"tonic",
|
"tonic",
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
"tracing-log",
|
||||||
"tracing-opentelemetry",
|
"tracing-opentelemetry",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
"util",
|
"util",
|
||||||
|
@ -2590,6 +2591,15 @@ version = "1.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
|
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matchers"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
||||||
|
dependencies = [
|
||||||
|
"regex-automata",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matches"
|
name = "matches"
|
||||||
version = "0.1.8"
|
version = "0.1.8"
|
||||||
|
@ -3737,6 +3747,15 @@ dependencies = [
|
||||||
"regex-syntax",
|
"regex-syntax",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-automata"
|
||||||
|
version = "0.1.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||||
|
dependencies = [
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.6.25"
|
version = "0.6.25"
|
||||||
|
@ -3849,7 +3868,6 @@ dependencies = [
|
||||||
"collections",
|
"collections",
|
||||||
"futures",
|
"futures",
|
||||||
"gpui",
|
"gpui",
|
||||||
"log",
|
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"prost 0.8.0",
|
"prost 0.8.0",
|
||||||
"prost-build 0.8.0",
|
"prost-build 0.8.0",
|
||||||
|
@ -3859,6 +3877,7 @@ dependencies = [
|
||||||
"smol",
|
"smol",
|
||||||
"smol-timeout",
|
"smol-timeout",
|
||||||
"tempdir",
|
"tempdir",
|
||||||
|
"tracing",
|
||||||
"util",
|
"util",
|
||||||
"zstd",
|
"zstd",
|
||||||
]
|
]
|
||||||
|
@ -5247,9 +5266,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing"
|
name = "tracing"
|
||||||
version = "0.1.26"
|
version = "0.1.34"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
|
checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"log",
|
"log",
|
||||||
|
@ -5260,9 +5279,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-attributes"
|
name = "tracing-attributes"
|
||||||
version = "0.1.15"
|
version = "0.1.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
|
checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -5320,9 +5339,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
|
checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.12.1",
|
"ansi_term 0.12.1",
|
||||||
|
"lazy_static",
|
||||||
|
"matchers",
|
||||||
|
"regex",
|
||||||
"sharded-slab",
|
"sharded-slab",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thread_local",
|
"thread_local",
|
||||||
|
"tracing",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-log",
|
"tracing-log",
|
||||||
]
|
]
|
||||||
|
@ -5987,7 +6010,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zed"
|
name = "zed"
|
||||||
version = "0.32.0"
|
version = "0.33.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assets",
|
"assets",
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c",
|
"background": "#3f3b45",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#e2dfe7",
|
"icon_color": "#e2dfe7",
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#8b8792",
|
"icon_color": "#8b8792",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#e2dfe7",
|
"icon_color": "#e2dfe7",
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#efecf4",
|
"icon_color": "#efecf4",
|
||||||
"background": "#5852605c"
|
"background": "#3f3b45"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#8b8792",
|
"color": "#8b8792",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d",
|
"background": "#3f3b45",
|
||||||
"color": "#8b8792"
|
"color": "#8b8792"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c",
|
"background": "#4c4653",
|
||||||
"color": "#efecf4"
|
"color": "#efecf4"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#5852603d",
|
"background": "#3f3b45",
|
||||||
"color": "#efecf4"
|
"color": "#efecf4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#efecf4",
|
"text_color": "#efecf4",
|
||||||
"background": "#19171c",
|
"background": "#19171c",
|
||||||
"active_line_background": "#efecf412",
|
"active_line_background": "#26232a",
|
||||||
"code_actions_indicator": "#8b8792",
|
"code_actions_indicator": "#8b8792",
|
||||||
"diff_background_deleted": "#be467826",
|
"diff_background_deleted": "#be467826",
|
||||||
"diff_background_inserted": "#2a929226",
|
"diff_background_inserted": "#2a929226",
|
||||||
"document_highlight_read_background": "#efecf41f",
|
"document_highlight_read_background": "#5852603d",
|
||||||
"document_highlight_write_background": "#efecf43d",
|
"document_highlight_write_background": "#5852607a",
|
||||||
"error_color": "#be4678",
|
"error_color": "#be4678",
|
||||||
"gutter_background": "#19171c",
|
"gutter_background": "#19171c",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#efecf41f",
|
"highlighted_line_background": "#332f38",
|
||||||
"line_number": "#7e7887",
|
"line_number": "#7e7887",
|
||||||
"line_number_active": "#efecf4",
|
"line_number_active": "#efecf4",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#26232a3d"
|
"background": "#1c1a20"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#26232a5c"
|
"background": "#201d23"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#efecf412",
|
"background": "#26232a",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#8b8792",
|
"color": "#e2dfe7",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d",
|
"background": "#332f38",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c",
|
"background": "#3f3b45",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#5852603d",
|
"background": "#332f38",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#efecf4",
|
"color": "#efecf4",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#26232a5c",
|
"background": "#201d23",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#5852603d",
|
"background": "#332f38",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#5852603d",
|
"background": "#332f38",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5852605c"
|
"background": "#4c4653"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,7 +1326,7 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c"
|
"background": "#4c4653"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d"
|
"background": "#3f3b45"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"color": "#8b8792",
|
"color": "#8b8792",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#26232a",
|
"background": "#26232a",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c"
|
"background": "#3f3b45"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5852605c",
|
"background": "#3f3b45",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
|
@ -1436,7 +1436,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d"
|
"background": "#332f38"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"color": "#e2dfe7",
|
"color": "#e2dfe7",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5852603d"
|
"background": "#3f3b45"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"color": "#8b8792",
|
"color": "#8b8792",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,14 +1521,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#955ae77a",
|
"match_background": "#3d1576",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#8b8792",
|
"color": "#8b8792",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#26232a",
|
"background": "#332f38",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -1547,7 +1547,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#efecf4",
|
"color": "#efecf4",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5852607a",
|
"background": "#4c4653",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#655f6d",
|
"color": "#655f6d",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1557,7 +1557,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#efecf4",
|
"color": "#efecf4",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5852603d",
|
"background": "#3f3b45",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#655f6d",
|
"color": "#655f6d",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#26232a3d"
|
"background": "#1c1a20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e",
|
"background": "#b7b3bd",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": false,
|
"bottom": false,
|
||||||
|
@ -162,13 +162,13 @@
|
||||||
"cursor": "Arrow"
|
"cursor": "Arrow"
|
||||||
},
|
},
|
||||||
"sidebar_resize_handle": {
|
"sidebar_resize_handle": {
|
||||||
"background": "#efecf4",
|
"background": "#8b8792",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 1
|
"left": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pane_divider": {
|
"pane_divider": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"status_bar": {
|
"status_bar": {
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
"right": 6
|
"right": 6
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true,
|
"top": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#26232a",
|
"icon_color": "#26232a",
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#585260",
|
"icon_color": "#585260",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#26232a",
|
"icon_color": "#26232a",
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#19171c",
|
"icon_color": "#19171c",
|
||||||
"background": "#8b87922e"
|
"background": "#b7b3bd"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -393,14 +393,14 @@
|
||||||
"width": 12
|
"width": 12
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
},
|
},
|
||||||
"sign_in_prompt": {
|
"sign_in_prompt": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#585260",
|
"color": "#585260",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f",
|
"background": "#b7b3bd",
|
||||||
"color": "#585260"
|
"color": "#585260"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e",
|
"background": "#a19da7",
|
||||||
"color": "#19171c"
|
"color": "#19171c"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#8b87921f",
|
"background": "#b7b3bd",
|
||||||
"color": "#19171c"
|
"color": "#19171c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
"height": 34,
|
"height": 34,
|
||||||
"background": "#efecf4",
|
"background": "#efecf4",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true
|
"bottom": true
|
||||||
},
|
},
|
||||||
|
@ -502,7 +502,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 12,
|
"padding": 12,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#19171c",
|
"text_color": "#19171c",
|
||||||
"background": "#efecf4",
|
"background": "#efecf4",
|
||||||
"active_line_background": "#19171c12",
|
"active_line_background": "#e2dfe7",
|
||||||
"code_actions_indicator": "#585260",
|
"code_actions_indicator": "#585260",
|
||||||
"diff_background_deleted": "#be467826",
|
"diff_background_deleted": "#be467826",
|
||||||
"diff_background_inserted": "#2a929226",
|
"diff_background_inserted": "#2a929226",
|
||||||
"document_highlight_read_background": "#19171c0f",
|
"document_highlight_read_background": "#8b87921f",
|
||||||
"document_highlight_write_background": "#19171c1f",
|
"document_highlight_write_background": "#8b87923d",
|
||||||
"error_color": "#be4678",
|
"error_color": "#be4678",
|
||||||
"gutter_background": "#efecf4",
|
"gutter_background": "#efecf4",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#19171c1f",
|
"highlighted_line_background": "#ccc9d2",
|
||||||
"line_number": "#655f6d",
|
"line_number": "#655f6d",
|
||||||
"line_number_active": "#19171c",
|
"line_number_active": "#19171c",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -578,7 +578,7 @@
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"item": {
|
"item": {
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#e2dfe71f"
|
"background": "#ece9f1"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#e2dfe72e"
|
"background": "#e9e6ee"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -624,7 +624,7 @@
|
||||||
"icon_width_factor": 1.5,
|
"icon_width_factor": 1.5,
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"top": true
|
"top": true
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#19171c12",
|
"background": "#e2dfe7",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -672,7 +672,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -787,7 +787,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -810,7 +810,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -833,7 +833,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#585260",
|
"color": "#26232a",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -959,7 +959,7 @@
|
||||||
"corner_radius": 4,
|
"corner_radius": 4,
|
||||||
"background": "#efecf4",
|
"background": "#efecf4",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f",
|
"background": "#ccc9d2",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e",
|
"background": "#b7b3bd",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#8b87921f",
|
"background": "#ccc9d2",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#19171c",
|
"color": "#19171c",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#e2dfe72e",
|
"background": "#e9e6ee",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#8b87921f",
|
"background": "#ccc9d2",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#8b87921f",
|
"background": "#ccc9d2",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1151,7 +1151,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -1242,7 +1242,7 @@
|
||||||
"selection": "#576ddb3d"
|
"selection": "#576ddb3d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1276,7 +1276,7 @@
|
||||||
"selection": "#576ddb3d"
|
"selection": "#576ddb3d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#8b87922e"
|
"background": "#a19da7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,17 +1326,17 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e"
|
"background": "#a19da7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
"color": "#7e7887",
|
"color": "#655f6d",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"hover": {
|
"hover": {
|
||||||
"color": "#7e7887"
|
"color": "#655f6d"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"color": "#7e7887"
|
"color": "#655f6d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_avatar": {
|
"contact_avatar": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f"
|
"background": "#b7b3bd"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"color": "#585260",
|
"color": "#585260",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#e2dfe7",
|
"background": "#e2dfe7",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e"
|
"background": "#b7b3bd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#8b87922e",
|
"background": "#b7b3bd",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
|
@ -1436,11 +1436,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f"
|
"background": "#ccc9d2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#efecf4",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -1474,7 +1474,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"color": "#26232a",
|
"color": "#26232a",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#8b87921f"
|
"background": "#b7b3bd"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"color": "#585260",
|
"color": "#585260",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,17 +1521,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#955ae73d",
|
"match_background": "#d5bdfa",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#585260",
|
"color": "#585260",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#e2dfe7",
|
"background": "#ccc9d2",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1547,9 +1547,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#19171c",
|
"color": "#19171c",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#8b87923d",
|
"background": "#a19da7",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#7e7887",
|
"color": "#655f6d",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1557,9 +1557,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#19171c",
|
"color": "#19171c",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#8b87921f",
|
"background": "#b7b3bd",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#7e7887",
|
"color": "#655f6d",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1584,7 +1584,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#e2dfe7",
|
"color": "#8b8792",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#e2dfe71f"
|
"background": "#ece9f1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c",
|
"background": "#30525c",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#eee8d5",
|
"icon_color": "#eee8d5",
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#93a1a1",
|
"icon_color": "#93a1a1",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#eee8d5",
|
"icon_color": "#eee8d5",
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#fdf6e3",
|
"icon_color": "#fdf6e3",
|
||||||
"background": "#586e755c"
|
"background": "#30525c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#93a1a1",
|
"color": "#93a1a1",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d",
|
"background": "#30525c",
|
||||||
"color": "#93a1a1"
|
"color": "#93a1a1"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c",
|
"background": "#446068",
|
||||||
"color": "#fdf6e3"
|
"color": "#fdf6e3"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#586e753d",
|
"background": "#30525c",
|
||||||
"color": "#fdf6e3"
|
"color": "#fdf6e3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#fdf6e3",
|
"text_color": "#fdf6e3",
|
||||||
"background": "#002b36",
|
"background": "#002b36",
|
||||||
"active_line_background": "#fdf6e312",
|
"active_line_background": "#073642",
|
||||||
"code_actions_indicator": "#93a1a1",
|
"code_actions_indicator": "#93a1a1",
|
||||||
"diff_background_deleted": "#dc322f26",
|
"diff_background_deleted": "#dc322f26",
|
||||||
"diff_background_inserted": "#85990026",
|
"diff_background_inserted": "#85990026",
|
||||||
"document_highlight_read_background": "#fdf6e31f",
|
"document_highlight_read_background": "#586e753d",
|
||||||
"document_highlight_write_background": "#fdf6e33d",
|
"document_highlight_write_background": "#586e757a",
|
||||||
"error_color": "#dc322f",
|
"error_color": "#dc322f",
|
||||||
"gutter_background": "#002b36",
|
"gutter_background": "#002b36",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#fdf6e31f",
|
"highlighted_line_background": "#1b444f",
|
||||||
"line_number": "#839496",
|
"line_number": "#839496",
|
||||||
"line_number_active": "#fdf6e3",
|
"line_number_active": "#fdf6e3",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#0736423d"
|
"background": "#022e39"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#0736425c"
|
"background": "#04313c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#fdf6e312",
|
"background": "#073642",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#93a1a1",
|
"color": "#eee8d5",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d",
|
"background": "#1b444f",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c",
|
"background": "#30525c",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#586e753d",
|
"background": "#1b444f",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#fdf6e3",
|
"color": "#fdf6e3",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#0736425c",
|
"background": "#04313c",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#586e753d",
|
"background": "#1b444f",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#586e753d",
|
"background": "#1b444f",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#586e755c"
|
"background": "#446068"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,7 +1326,7 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c"
|
"background": "#446068"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d"
|
"background": "#30525c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"color": "#93a1a1",
|
"color": "#93a1a1",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#073642",
|
"background": "#073642",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c"
|
"background": "#30525c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#586e755c",
|
"background": "#30525c",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
|
@ -1436,7 +1436,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d"
|
"background": "#1b444f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"color": "#eee8d5",
|
"color": "#eee8d5",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#586e753d"
|
"background": "#30525c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"color": "#93a1a1",
|
"color": "#93a1a1",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,14 +1521,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#6c71c47a",
|
"match_background": "#1b1f6b",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#93a1a1",
|
"color": "#93a1a1",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#073642",
|
"background": "#1b444f",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -1547,7 +1547,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#fdf6e3",
|
"color": "#fdf6e3",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#586e757a",
|
"background": "#446068",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#657b83",
|
"color": "#657b83",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1557,7 +1557,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#fdf6e3",
|
"color": "#fdf6e3",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#586e753d",
|
"background": "#30525c",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#657b83",
|
"color": "#657b83",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#0736423d"
|
"background": "#022e39"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e",
|
"background": "#c1c5bb",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": false,
|
"bottom": false,
|
||||||
|
@ -162,13 +162,13 @@
|
||||||
"cursor": "Arrow"
|
"cursor": "Arrow"
|
||||||
},
|
},
|
||||||
"sidebar_resize_handle": {
|
"sidebar_resize_handle": {
|
||||||
"background": "#fdf6e3",
|
"background": "#93a1a1",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 1
|
"left": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pane_divider": {
|
"pane_divider": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"status_bar": {
|
"status_bar": {
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
"right": 6
|
"right": 6
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true,
|
"top": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#073642",
|
"icon_color": "#073642",
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#586e75",
|
"icon_color": "#586e75",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#073642",
|
"icon_color": "#073642",
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#002b36",
|
"icon_color": "#002b36",
|
||||||
"background": "#93a1a12e"
|
"background": "#c1c5bb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -393,14 +393,14 @@
|
||||||
"width": 12
|
"width": 12
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
},
|
},
|
||||||
"sign_in_prompt": {
|
"sign_in_prompt": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#586e75",
|
"color": "#586e75",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f",
|
"background": "#c1c5bb",
|
||||||
"color": "#586e75"
|
"color": "#586e75"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e",
|
"background": "#aab3ae",
|
||||||
"color": "#002b36"
|
"color": "#002b36"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#93a1a11f",
|
"background": "#c1c5bb",
|
||||||
"color": "#002b36"
|
"color": "#002b36"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
"height": 34,
|
"height": 34,
|
||||||
"background": "#fdf6e3",
|
"background": "#fdf6e3",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true
|
"bottom": true
|
||||||
},
|
},
|
||||||
|
@ -502,7 +502,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 12,
|
"padding": 12,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#002b36",
|
"text_color": "#002b36",
|
||||||
"background": "#fdf6e3",
|
"background": "#fdf6e3",
|
||||||
"active_line_background": "#002b3612",
|
"active_line_background": "#eee8d5",
|
||||||
"code_actions_indicator": "#586e75",
|
"code_actions_indicator": "#586e75",
|
||||||
"diff_background_deleted": "#dc322f26",
|
"diff_background_deleted": "#dc322f26",
|
||||||
"diff_background_inserted": "#85990026",
|
"diff_background_inserted": "#85990026",
|
||||||
"document_highlight_read_background": "#002b360f",
|
"document_highlight_read_background": "#93a1a11f",
|
||||||
"document_highlight_write_background": "#002b361f",
|
"document_highlight_write_background": "#93a1a13d",
|
||||||
"error_color": "#dc322f",
|
"error_color": "#dc322f",
|
||||||
"gutter_background": "#fdf6e3",
|
"gutter_background": "#fdf6e3",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#002b361f",
|
"highlighted_line_background": "#d7d6c8",
|
||||||
"line_number": "#657b83",
|
"line_number": "#657b83",
|
||||||
"line_number_active": "#002b36",
|
"line_number_active": "#002b36",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -578,7 +578,7 @@
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"item": {
|
"item": {
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#eee8d51f"
|
"background": "#f9f3e0"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#eee8d52e"
|
"background": "#f6efdc"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -624,7 +624,7 @@
|
||||||
"icon_width_factor": 1.5,
|
"icon_width_factor": 1.5,
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"top": true
|
"top": true
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#002b3612",
|
"background": "#eee8d5",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -672,7 +672,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -787,7 +787,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -810,7 +810,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -833,7 +833,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#586e75",
|
"color": "#073642",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -959,7 +959,7 @@
|
||||||
"corner_radius": 4,
|
"corner_radius": 4,
|
||||||
"background": "#fdf6e3",
|
"background": "#fdf6e3",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f",
|
"background": "#d7d6c8",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e",
|
"background": "#c1c5bb",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#93a1a11f",
|
"background": "#d7d6c8",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#002b36",
|
"color": "#002b36",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#eee8d52e",
|
"background": "#f6efdc",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#93a1a11f",
|
"background": "#d7d6c8",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#93a1a11f",
|
"background": "#d7d6c8",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1151,7 +1151,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -1242,7 +1242,7 @@
|
||||||
"selection": "#268bd23d"
|
"selection": "#268bd23d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1276,7 +1276,7 @@
|
||||||
"selection": "#268bd23d"
|
"selection": "#268bd23d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#93a1a12e"
|
"background": "#aab3ae"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,17 +1326,17 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e"
|
"background": "#aab3ae"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
"color": "#839496",
|
"color": "#657b83",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"hover": {
|
"hover": {
|
||||||
"color": "#839496"
|
"color": "#657b83"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"color": "#839496"
|
"color": "#657b83"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_avatar": {
|
"contact_avatar": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f"
|
"background": "#c1c5bb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"color": "#586e75",
|
"color": "#586e75",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#eee8d5",
|
"background": "#eee8d5",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e"
|
"background": "#c1c5bb"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#93a1a12e",
|
"background": "#c1c5bb",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
|
@ -1436,11 +1436,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f"
|
"background": "#d7d6c8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#fdf6e3",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -1474,7 +1474,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"color": "#073642",
|
"color": "#073642",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#93a1a11f"
|
"background": "#c1c5bb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"color": "#586e75",
|
"color": "#586e75",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,17 +1521,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#6c71c43d",
|
"match_background": "#bcc0f6",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#586e75",
|
"color": "#586e75",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#eee8d5",
|
"background": "#d7d6c8",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1547,9 +1547,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#002b36",
|
"color": "#002b36",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#93a1a13d",
|
"background": "#aab3ae",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#839496",
|
"color": "#657b83",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1557,9 +1557,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#002b36",
|
"color": "#002b36",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#93a1a11f",
|
"background": "#c1c5bb",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#839496",
|
"color": "#657b83",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1584,7 +1584,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#eee8d5",
|
"color": "#93a1a1",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#eee8d51f"
|
"background": "#f9f3e0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c",
|
"background": "#444c6f",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#dfe2f1",
|
"icon_color": "#dfe2f1",
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#979db4",
|
"icon_color": "#979db4",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#dfe2f1",
|
"icon_color": "#dfe2f1",
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#f5f7ff",
|
"icon_color": "#f5f7ff",
|
||||||
"background": "#5e66875c"
|
"background": "#444c6f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#979db4",
|
"color": "#979db4",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d",
|
"background": "#444c6f",
|
||||||
"color": "#979db4"
|
"color": "#979db4"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c",
|
"background": "#51597b",
|
||||||
"color": "#f5f7ff"
|
"color": "#f5f7ff"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#5e66873d",
|
"background": "#444c6f",
|
||||||
"color": "#f5f7ff"
|
"color": "#f5f7ff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#f5f7ff",
|
"text_color": "#f5f7ff",
|
||||||
"background": "#202746",
|
"background": "#202746",
|
||||||
"active_line_background": "#f5f7ff12",
|
"active_line_background": "#293256",
|
||||||
"code_actions_indicator": "#979db4",
|
"code_actions_indicator": "#979db4",
|
||||||
"diff_background_deleted": "#c9492226",
|
"diff_background_deleted": "#c9492226",
|
||||||
"diff_background_inserted": "#ac973926",
|
"diff_background_inserted": "#ac973926",
|
||||||
"document_highlight_read_background": "#f5f7ff1f",
|
"document_highlight_read_background": "#5e66873d",
|
||||||
"document_highlight_write_background": "#f5f7ff3d",
|
"document_highlight_write_background": "#5e66877a",
|
||||||
"error_color": "#c94922",
|
"error_color": "#c94922",
|
||||||
"gutter_background": "#202746",
|
"gutter_background": "#202746",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#f5f7ff1f",
|
"highlighted_line_background": "#363f62",
|
||||||
"line_number": "#898ea4",
|
"line_number": "#898ea4",
|
||||||
"line_number_active": "#f5f7ff",
|
"line_number_active": "#f5f7ff",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#2932563d"
|
"background": "#222a4a"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#2932565c"
|
"background": "#252d4e"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#f5f7ff12",
|
"background": "#293256",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#979db4",
|
"color": "#dfe2f1",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d",
|
"background": "#363f62",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c",
|
"background": "#444c6f",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#5e66873d",
|
"background": "#363f62",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#f5f7ff",
|
"color": "#f5f7ff",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#2932565c",
|
"background": "#252d4e",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#5e66873d",
|
"background": "#363f62",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#5e66873d",
|
"background": "#363f62",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5e66875c"
|
"background": "#51597b"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,7 +1326,7 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c"
|
"background": "#51597b"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d"
|
"background": "#444c6f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"color": "#979db4",
|
"color": "#979db4",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#293256",
|
"background": "#293256",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c"
|
"background": "#444c6f"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#5e66875c",
|
"background": "#444c6f",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
|
@ -1436,7 +1436,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d"
|
"background": "#363f62"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"color": "#dfe2f1",
|
"color": "#dfe2f1",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#5e66873d"
|
"background": "#444c6f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"color": "#979db4",
|
"color": "#979db4",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,14 +1521,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#6679cc7a",
|
"match_background": "#1a2a6d",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#979db4",
|
"color": "#979db4",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#293256",
|
"background": "#363f62",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -1547,7 +1547,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#f5f7ff",
|
"color": "#f5f7ff",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5e66877a",
|
"background": "#51597b",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#6b7394",
|
"color": "#6b7394",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1557,7 +1557,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#f5f7ff",
|
"color": "#f5f7ff",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#5e66873d",
|
"background": "#444c6f",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#6b7394",
|
"color": "#6b7394",
|
||||||
"width": 1
|
"width": 1
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#2932563d"
|
"background": "#222a4a"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e",
|
"background": "#bbc0d3",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"left": true,
|
"left": true,
|
||||||
"bottom": false,
|
"bottom": false,
|
||||||
|
@ -162,13 +162,13 @@
|
||||||
"cursor": "Arrow"
|
"cursor": "Arrow"
|
||||||
},
|
},
|
||||||
"sidebar_resize_handle": {
|
"sidebar_resize_handle": {
|
||||||
"background": "#f5f7ff",
|
"background": "#979db4",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 1
|
"left": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pane_divider": {
|
"pane_divider": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"status_bar": {
|
"status_bar": {
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
"right": 6
|
"right": 6
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true,
|
"top": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"icon_color": "#293256",
|
"icon_color": "#293256",
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_message": {
|
"diagnostic_message": {
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"left": 7,
|
"left": 7,
|
||||||
"right": 7
|
"right": 7
|
||||||
},
|
},
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
},
|
},
|
||||||
"container_warning": {
|
"container_warning": {
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -345,11 +345,11 @@
|
||||||
"icon_color": "#5e6687",
|
"icon_color": "#5e6687",
|
||||||
"hover": {
|
"hover": {
|
||||||
"icon_color": "#293256",
|
"icon_color": "#293256",
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"icon_color": "#202746",
|
"icon_color": "#202746",
|
||||||
"background": "#979db42e"
|
"background": "#bbc0d3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge": {
|
"badge": {
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
"avatar_width": 18,
|
"avatar_width": 18,
|
||||||
"avatar_margin": 8,
|
"avatar_margin": 8,
|
||||||
"height": 33,
|
"height": 33,
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": 80,
|
"left": 80,
|
||||||
"right": 6
|
"right": 6
|
||||||
|
@ -393,14 +393,14 @@
|
||||||
"width": 12
|
"width": 12
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"overlay": true
|
"overlay": true
|
||||||
},
|
},
|
||||||
"sign_in_prompt": {
|
"sign_in_prompt": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
|
@ -436,15 +436,15 @@
|
||||||
},
|
},
|
||||||
"color": "#5e6687",
|
"color": "#5e6687",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f",
|
"background": "#bbc0d3",
|
||||||
"color": "#5e6687"
|
"color": "#5e6687"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e",
|
"background": "#a9aec3",
|
||||||
"color": "#202746"
|
"color": "#202746"
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#979db41f",
|
"background": "#bbc0d3",
|
||||||
"color": "#202746"
|
"color": "#202746"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
"height": 34,
|
"height": 34,
|
||||||
"background": "#f5f7ff",
|
"background": "#f5f7ff",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true
|
"bottom": true
|
||||||
},
|
},
|
||||||
|
@ -502,7 +502,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 12,
|
"padding": 12,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -525,16 +525,16 @@
|
||||||
"editor": {
|
"editor": {
|
||||||
"text_color": "#202746",
|
"text_color": "#202746",
|
||||||
"background": "#f5f7ff",
|
"background": "#f5f7ff",
|
||||||
"active_line_background": "#20274612",
|
"active_line_background": "#dfe2f1",
|
||||||
"code_actions_indicator": "#5e6687",
|
"code_actions_indicator": "#5e6687",
|
||||||
"diff_background_deleted": "#c9492226",
|
"diff_background_deleted": "#c9492226",
|
||||||
"diff_background_inserted": "#ac973926",
|
"diff_background_inserted": "#ac973926",
|
||||||
"document_highlight_read_background": "#2027460f",
|
"document_highlight_read_background": "#979db41f",
|
||||||
"document_highlight_write_background": "#2027461f",
|
"document_highlight_write_background": "#979db43d",
|
||||||
"error_color": "#c94922",
|
"error_color": "#c94922",
|
||||||
"gutter_background": "#f5f7ff",
|
"gutter_background": "#f5f7ff",
|
||||||
"gutter_padding_factor": 3.5,
|
"gutter_padding_factor": 3.5,
|
||||||
"highlighted_line_background": "#2027461f",
|
"highlighted_line_background": "#cdd1e2",
|
||||||
"line_number": "#6b7394",
|
"line_number": "#6b7394",
|
||||||
"line_number_active": "#202746",
|
"line_number_active": "#202746",
|
||||||
"rename_fade": 0.6,
|
"rename_fade": 0.6,
|
||||||
|
@ -578,7 +578,7 @@
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"item": {
|
"item": {
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#dfe2f11f"
|
"background": "#f0f2fc"
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
"left": -14
|
"left": -14
|
||||||
|
@ -616,7 +616,7 @@
|
||||||
"right": 6,
|
"right": 6,
|
||||||
"top": 2
|
"top": 2
|
||||||
},
|
},
|
||||||
"background": "#dfe2f12e"
|
"background": "#eaedf8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_header": {
|
"diagnostic_header": {
|
||||||
|
@ -624,7 +624,7 @@
|
||||||
"icon_width_factor": 1.5,
|
"icon_width_factor": 1.5,
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"bottom": true,
|
"bottom": true,
|
||||||
"top": true
|
"top": true
|
||||||
|
@ -652,7 +652,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"diagnostic_path_header": {
|
"diagnostic_path_header": {
|
||||||
"background": "#20274612",
|
"background": "#dfe2f1",
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"filename": {
|
"filename": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
|
@ -672,7 +672,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -787,7 +787,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -810,7 +810,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -833,7 +833,7 @@
|
||||||
"text_scale_factor": 0.857,
|
"text_scale_factor": 0.857,
|
||||||
"header": {
|
"header": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"top": true
|
"top": true
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"punctuation": {
|
"punctuation": {
|
||||||
"color": "#5e6687",
|
"color": "#293256",
|
||||||
"weight": "normal"
|
"weight": "normal"
|
||||||
},
|
},
|
||||||
"constant": {
|
"constant": {
|
||||||
|
@ -959,7 +959,7 @@
|
||||||
"corner_radius": 4,
|
"corner_radius": 4,
|
||||||
"background": "#f5f7ff",
|
"background": "#f5f7ff",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -999,7 +999,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f",
|
"background": "#cdd1e2",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -1007,7 +1007,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e",
|
"background": "#bbc0d3",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active_hover": {
|
"active_hover": {
|
||||||
"background": "#979db41f",
|
"background": "#cdd1e2",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#202746",
|
"color": "#202746",
|
||||||
|
@ -1024,7 +1024,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename_editor": {
|
"filename_editor": {
|
||||||
"background": "#dfe2f12e",
|
"background": "#eaedf8",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -1108,7 +1108,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#979db41f",
|
"background": "#cdd1e2",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"active_item": {
|
"active_item": {
|
||||||
|
@ -1143,7 +1143,7 @@
|
||||||
"right": 8
|
"right": 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": "#979db41f",
|
"background": "#cdd1e2",
|
||||||
"corner_radius": 6
|
"corner_radius": 6
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
|
@ -1151,7 +1151,7 @@
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"padding": 4,
|
"padding": 4,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"shadow": {
|
"shadow": {
|
||||||
|
@ -1242,7 +1242,7 @@
|
||||||
"selection": "#3d8fd13d"
|
"selection": "#3d8fd13d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1276,7 +1276,7 @@
|
||||||
"selection": "#3d8fd13d"
|
"selection": "#3d8fd13d"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1317,7 +1317,7 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#979db42e"
|
"background": "#a9aec3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_row": {
|
"contact_row": {
|
||||||
|
@ -1326,17 +1326,17 @@
|
||||||
"right": 12
|
"right": 12
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e"
|
"background": "#a9aec3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tree_branch": {
|
"tree_branch": {
|
||||||
"color": "#898ea4",
|
"color": "#6b7394",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"hover": {
|
"hover": {
|
||||||
"color": "#898ea4"
|
"color": "#6b7394"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"color": "#898ea4"
|
"color": "#6b7394"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_avatar": {
|
"contact_avatar": {
|
||||||
|
@ -1353,17 +1353,17 @@
|
||||||
},
|
},
|
||||||
"contact_button_spacing": 8,
|
"contact_button_spacing": 8,
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f"
|
"background": "#bbc0d3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"color": "#5e6687",
|
"color": "#5e6687",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1397,10 +1397,10 @@
|
||||||
},
|
},
|
||||||
"background": "#dfe2f1",
|
"background": "#dfe2f1",
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e"
|
"background": "#bbc0d3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1428,7 +1428,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"background": "#979db42e",
|
"background": "#bbc0d3",
|
||||||
"text": {
|
"text": {
|
||||||
"family": "Zed Sans",
|
"family": "Zed Sans",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
|
@ -1436,11 +1436,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f"
|
"background": "#cdd1e2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#f5f7ff",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
|
@ -1474,7 +1474,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"padding": {
|
"padding": {
|
||||||
|
@ -1503,17 +1503,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contact_button": {
|
"contact_button": {
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"color": "#293256",
|
"color": "#293256",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
"corner_radius": 8,
|
"corner_radius": 8,
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#979db41f"
|
"background": "#bbc0d3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_contact_button": {
|
"disabled_contact_button": {
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"color": "#5e6687",
|
"color": "#5e6687",
|
||||||
"icon_width": 8,
|
"icon_width": 8,
|
||||||
"button_width": 16,
|
"button_width": 16,
|
||||||
|
@ -1521,17 +1521,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"match_background": "#6679cc3d",
|
"match_background": "#bcc6f7",
|
||||||
"tab_icon_spacing": 8,
|
"tab_icon_spacing": 8,
|
||||||
"tab_icon_width": 14,
|
"tab_icon_width": 14,
|
||||||
"option_button": {
|
"option_button": {
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#5e6687",
|
"color": "#5e6687",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#dfe2f1",
|
"background": "#cdd1e2",
|
||||||
"corner_radius": 6,
|
"corner_radius": 6,
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1547,9 +1547,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#202746",
|
"color": "#202746",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#979db43d",
|
"background": "#a9aec3",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#898ea4",
|
"color": "#6b7394",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1557,9 +1557,9 @@
|
||||||
"family": "Zed Mono",
|
"family": "Zed Mono",
|
||||||
"color": "#202746",
|
"color": "#202746",
|
||||||
"size": 14,
|
"size": 14,
|
||||||
"background": "#979db41f",
|
"background": "#bbc0d3",
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#898ea4",
|
"color": "#6b7394",
|
||||||
"width": 1
|
"width": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1584,7 +1584,7 @@
|
||||||
"size": 14
|
"size": 14
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"color": "#dfe2f1",
|
"color": "#979db4",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"margin": {
|
"margin": {
|
||||||
|
@ -1693,7 +1693,7 @@
|
||||||
"left": 6
|
"left": 6
|
||||||
},
|
},
|
||||||
"hover": {
|
"hover": {
|
||||||
"background": "#dfe2f11f"
|
"background": "#f0f2fc"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dismiss_button": {
|
"dismiss_button": {
|
||||||
|
|
|
@ -37,11 +37,9 @@ impl Breadcrumbs {
|
||||||
cx: &AppContext,
|
cx: &AppContext,
|
||||||
) -> Option<(ModelHandle<Buffer>, Vec<OutlineItem<Anchor>>)> {
|
) -> Option<(ModelHandle<Buffer>, Vec<OutlineItem<Anchor>>)> {
|
||||||
let editor = self.editor.as_ref()?.read(cx);
|
let editor = self.editor.as_ref()?.read(cx);
|
||||||
let cursor = editor.newest_anchor_selection().head();
|
let cursor = editor.selections.newest_anchor().head();
|
||||||
let multibuffer = &editor.buffer().read(cx);
|
let multibuffer = &editor.buffer().read(cx);
|
||||||
let (buffer_id, symbols) = multibuffer
|
let (buffer_id, symbols) = multibuffer.symbols_containing(cursor, Some(theme), cx)?;
|
||||||
.read(cx)
|
|
||||||
.symbols_containing(cursor, Some(theme))?;
|
|
||||||
let buffer = multibuffer.buffer(buffer_id)?;
|
let buffer = multibuffer.buffer(buffer_id)?;
|
||||||
Some((buffer, symbols))
|
Some((buffer, symbols))
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,9 @@ axum = { version = "0.5", features = ["json", "headers", "ws"] }
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
clap = { version = "3.1", features = ["derive"], optional = true }
|
clap = { version = "3.1", features = ["derive"], optional = true }
|
||||||
envy = "0.4.2"
|
envy = "0.4.2"
|
||||||
env_logger = "0.8"
|
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
lipsum = { version = "0.8", optional = true }
|
lipsum = { version = "0.8", optional = true }
|
||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
|
||||||
opentelemetry = { version = "0.17", features = ["rt-tokio"] }
|
opentelemetry = { version = "0.17", features = ["rt-tokio"] }
|
||||||
opentelemetry-otlp = { version = "0.10", features = ["tls-roots"] }
|
opentelemetry-otlp = { version = "0.10", features = ["tls-roots"] }
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
|
@ -44,9 +42,10 @@ tokio-tungstenite = "0.17"
|
||||||
tonic = "0.6"
|
tonic = "0.6"
|
||||||
tower = "0.4"
|
tower = "0.4"
|
||||||
toml = "0.5.8"
|
toml = "0.5.8"
|
||||||
tracing = "0.1"
|
tracing = "0.1.34"
|
||||||
|
tracing-log = "0.1.3"
|
||||||
tracing-opentelemetry = "0.17"
|
tracing-opentelemetry = "0.17"
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
|
||||||
|
|
||||||
[dependencies.sqlx]
|
[dependencies.sqlx]
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
|
@ -59,6 +58,7 @@ rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
client = { path = "../client", features = ["test-support"] }
|
client = { path = "../client", features = ["test-support"] }
|
||||||
editor = { path = "../editor", features = ["test-support"] }
|
editor = { path = "../editor", features = ["test-support"] }
|
||||||
language = { path = "../language", features = ["test-support"] }
|
language = { path = "../language", features = ["test-support"] }
|
||||||
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||||
lsp = { path = "../lsp", features = ["test-support"] }
|
lsp = { path = "../lsp", features = ["test-support"] }
|
||||||
project = { path = "../project", features = ["test-support"] }
|
project = { path = "../project", features = ["test-support"] }
|
||||||
settings = { path = "../settings", features = ["test-support"] }
|
settings = { path = "../settings", features = ["test-support"] }
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
ZED_ENVIRONMENT=production
|
ZED_ENVIRONMENT=production
|
||||||
RUST_LOG=info
|
RUST_LOG=info,rpc=debug
|
||||||
TRACE_LEVEL=debug
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
ZED_ENVIRONMENT=staging
|
ZED_ENVIRONMENT=staging
|
||||||
RUST_LOG=info
|
RUST_LOG=info,rpc=debug
|
||||||
TRACE_LEVEL=debug
|
|
||||||
|
|
|
@ -83,8 +83,6 @@ spec:
|
||||||
key: token
|
key: token
|
||||||
- name: RUST_LOG
|
- name: RUST_LOG
|
||||||
value: ${RUST_LOG}
|
value: ${RUST_LOG}
|
||||||
- name: TRACE_LEVEL
|
|
||||||
value: ${TRACE_LEVEL}
|
|
||||||
- name: HONEYCOMB_DATASET
|
- name: HONEYCOMB_DATASET
|
||||||
value: "collab"
|
value: "collab"
|
||||||
- name: HONEYCOMB_API_KEY
|
- name: HONEYCOMB_API_KEY
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use super::db::{self, UserId};
|
use super::db::{self, UserId};
|
||||||
use crate::{AppState, Error};
|
use crate::{AppState, Error};
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
use axum::{
|
use axum::{
|
||||||
http::{self, Request, StatusCode},
|
http::{self, Request, StatusCode},
|
||||||
middleware::Next,
|
middleware::Next,
|
||||||
|
@ -51,7 +51,12 @@ pub async fn validate_header<B>(mut req: Request<B>, next: Next<B>) -> impl Into
|
||||||
}
|
}
|
||||||
|
|
||||||
if credentials_valid {
|
if credentials_valid {
|
||||||
req.extensions_mut().insert(user_id);
|
let user = state
|
||||||
|
.db
|
||||||
|
.get_user_by_id(user_id)
|
||||||
|
.await?
|
||||||
|
.ok_or_else(|| anyhow!("user {} not found", user_id))?;
|
||||||
|
req.extensions_mut().insert(user);
|
||||||
Ok::<_, Error>(next.run(req).await)
|
Ok::<_, Error>(next.run(req).await)
|
||||||
} else {
|
} else {
|
||||||
Err(Error::Http(
|
Err(Error::Http(
|
||||||
|
|
|
@ -11,7 +11,9 @@ use std::{
|
||||||
net::{SocketAddr, TcpListener},
|
net::{SocketAddr, TcpListener},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
use tracing::metadata::LevelFilter;
|
use tracing_log::LogTracer;
|
||||||
|
use tracing_subscriber::filter::EnvFilter;
|
||||||
|
use util::ResultExt;
|
||||||
|
|
||||||
#[derive(Default, Deserialize)]
|
#[derive(Default, Deserialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
|
@ -20,7 +22,7 @@ pub struct Config {
|
||||||
pub api_token: String,
|
pub api_token: String,
|
||||||
pub honeycomb_api_key: Option<String>,
|
pub honeycomb_api_key: Option<String>,
|
||||||
pub honeycomb_dataset: Option<String>,
|
pub honeycomb_dataset: Option<String>,
|
||||||
pub trace_level: Option<String>,
|
pub rust_log: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct AppState {
|
pub struct AppState {
|
||||||
|
@ -41,10 +43,8 @@ impl AppState {
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
env_logger::init();
|
|
||||||
|
|
||||||
if let Err(error) = env::load_dotenv() {
|
if let Err(error) = env::load_dotenv() {
|
||||||
log::error!(
|
eprintln!(
|
||||||
"error loading .env.toml (this is expected in production): {}",
|
"error loading .env.toml (this is expected in production): {}",
|
||||||
error
|
error
|
||||||
);
|
);
|
||||||
|
@ -119,42 +119,44 @@ pub fn init_tracing(config: &Config) -> Option<()> {
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use tracing_opentelemetry::OpenTelemetryLayer;
|
use tracing_opentelemetry::OpenTelemetryLayer;
|
||||||
use tracing_subscriber::layer::SubscriberExt;
|
use tracing_subscriber::layer::SubscriberExt;
|
||||||
|
let rust_log = config.rust_log.clone()?;
|
||||||
|
|
||||||
let (honeycomb_api_key, honeycomb_dataset) = config
|
LogTracer::init().log_err()?;
|
||||||
|
|
||||||
|
let open_telemetry_layer = config
|
||||||
.honeycomb_api_key
|
.honeycomb_api_key
|
||||||
.clone()
|
.clone()
|
||||||
.zip(config.honeycomb_dataset.clone())?;
|
.zip(config.honeycomb_dataset.clone())
|
||||||
|
.map(|(honeycomb_api_key, honeycomb_dataset)| {
|
||||||
|
let mut metadata = tonic::metadata::MetadataMap::new();
|
||||||
|
metadata.insert("x-honeycomb-team", honeycomb_api_key.parse().unwrap());
|
||||||
|
let tracer = opentelemetry_otlp::new_pipeline()
|
||||||
|
.tracing()
|
||||||
|
.with_exporter(
|
||||||
|
opentelemetry_otlp::new_exporter()
|
||||||
|
.tonic()
|
||||||
|
.with_endpoint("https://api.honeycomb.io")
|
||||||
|
.with_metadata(metadata),
|
||||||
|
)
|
||||||
|
.with_trace_config(opentelemetry::sdk::trace::config().with_resource(
|
||||||
|
opentelemetry::sdk::Resource::new(vec![KeyValue::new(
|
||||||
|
"service.name",
|
||||||
|
honeycomb_dataset,
|
||||||
|
)]),
|
||||||
|
))
|
||||||
|
.install_batch(opentelemetry::runtime::Tokio)
|
||||||
|
.expect("failed to initialize tracing");
|
||||||
|
|
||||||
let mut metadata = tonic::metadata::MetadataMap::new();
|
OpenTelemetryLayer::new(tracer)
|
||||||
metadata.insert("x-honeycomb-team", honeycomb_api_key.parse().unwrap());
|
});
|
||||||
let tracer = opentelemetry_otlp::new_pipeline()
|
|
||||||
.tracing()
|
|
||||||
.with_exporter(
|
|
||||||
opentelemetry_otlp::new_exporter()
|
|
||||||
.tonic()
|
|
||||||
.with_endpoint("https://api.honeycomb.io")
|
|
||||||
.with_metadata(metadata),
|
|
||||||
)
|
|
||||||
.with_trace_config(opentelemetry::sdk::trace::config().with_resource(
|
|
||||||
opentelemetry::sdk::Resource::new(vec![KeyValue::new(
|
|
||||||
"service.name",
|
|
||||||
honeycomb_dataset,
|
|
||||||
)]),
|
|
||||||
))
|
|
||||||
.install_batch(opentelemetry::runtime::Tokio)
|
|
||||||
.expect("failed to initialize tracing");
|
|
||||||
|
|
||||||
let subscriber = tracing_subscriber::Registry::default()
|
let subscriber = tracing_subscriber::Registry::default()
|
||||||
.with(OpenTelemetryLayer::new(tracer))
|
.with(open_telemetry_layer)
|
||||||
.with(tracing_subscriber::fmt::layer())
|
|
||||||
.with(
|
.with(
|
||||||
config
|
tracing_subscriber::fmt::layer()
|
||||||
.trace_level
|
.event_format(tracing_subscriber::fmt::format().pretty()),
|
||||||
.as_ref()
|
)
|
||||||
.map_or(LevelFilter::INFO, |level| {
|
.with(EnvFilter::from_str(rust_log.as_str()).log_err()?);
|
||||||
LevelFilter::from_str(level).unwrap()
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
tracing::subscriber::set_global_default(subscriber).unwrap();
|
tracing::subscriber::set_global_default(subscriber).unwrap();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ mod store;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
auth,
|
auth,
|
||||||
db::{self, ChannelId, MessageId, UserId},
|
db::{self, ChannelId, MessageId, User, UserId},
|
||||||
AppState, Result,
|
AppState, Result,
|
||||||
};
|
};
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
|
@ -49,7 +49,7 @@ use tokio::{
|
||||||
time::Sleep,
|
time::Sleep,
|
||||||
};
|
};
|
||||||
use tower::ServiceBuilder;
|
use tower::ServiceBuilder;
|
||||||
use tracing::{info_span, Instrument};
|
use tracing::{info_span, instrument, Instrument};
|
||||||
|
|
||||||
type MessageHandler =
|
type MessageHandler =
|
||||||
Box<dyn Send + Sync + Fn(Arc<Server>, Box<dyn AnyTypedEnvelope>) -> BoxFuture<'static, ()>>;
|
Box<dyn Send + Sync + Fn(Arc<Server>, Box<dyn AnyTypedEnvelope>) -> BoxFuture<'static, ()>>;
|
||||||
|
@ -248,12 +248,14 @@ impl Server {
|
||||||
self: &Arc<Self>,
|
self: &Arc<Self>,
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
address: String,
|
address: String,
|
||||||
user_id: UserId,
|
user: User,
|
||||||
mut send_connection_id: Option<mpsc::Sender<ConnectionId>>,
|
mut send_connection_id: Option<mpsc::Sender<ConnectionId>>,
|
||||||
executor: E,
|
executor: E,
|
||||||
) -> impl Future<Output = Result<()>> {
|
) -> impl Future<Output = Result<()>> {
|
||||||
let mut this = self.clone();
|
let mut this = self.clone();
|
||||||
let span = info_span!("handle connection", %user_id, %address);
|
let user_id = user.id;
|
||||||
|
let login = user.github_login;
|
||||||
|
let span = info_span!("handle connection", %user_id, %login, %address);
|
||||||
async move {
|
async move {
|
||||||
let (connection_id, handle_io, mut incoming_rx) = this
|
let (connection_id, handle_io, mut incoming_rx) = this
|
||||||
.peer
|
.peer
|
||||||
|
@ -268,7 +270,7 @@ impl Server {
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
tracing::info!(%user_id, %connection_id, %address, "connection opened");
|
tracing::info!(%user_id, %login, %connection_id, %address, "connection opened");
|
||||||
|
|
||||||
if let Some(send_connection_id) = send_connection_id.as_mut() {
|
if let Some(send_connection_id) = send_connection_id.as_mut() {
|
||||||
let _ = send_connection_id.send(connection_id).await;
|
let _ = send_connection_id.send(connection_id).await;
|
||||||
|
@ -291,14 +293,14 @@ impl Server {
|
||||||
futures::select_biased! {
|
futures::select_biased! {
|
||||||
result = handle_io => {
|
result = handle_io => {
|
||||||
if let Err(error) = result {
|
if let Err(error) = result {
|
||||||
tracing::error!(%error, "error handling I/O");
|
tracing::error!(?error, %user_id, %login, %connection_id, %address, "error handling I/O");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
message = next_message => {
|
message = next_message => {
|
||||||
if let Some(message) = message {
|
if let Some(message) = message {
|
||||||
let type_name = message.payload_type_name();
|
let type_name = message.payload_type_name();
|
||||||
let span = tracing::info_span!("receive message", %user_id, %connection_id, %address, type_name);
|
let span = tracing::info_span!("receive message", %user_id, %login, %connection_id, %address, type_name);
|
||||||
async {
|
async {
|
||||||
if let Some(handler) = this.handlers.get(&message.payload_type_id()) {
|
if let Some(handler) = this.handlers.get(&message.payload_type_id()) {
|
||||||
let notifications = this.notifications.clone();
|
let notifications = this.notifications.clone();
|
||||||
|
@ -316,25 +318,27 @@ impl Server {
|
||||||
handle_message.await;
|
handle_message.await;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tracing::error!("no message handler");
|
tracing::error!(%user_id, %login, %connection_id, %address, "no message handler");
|
||||||
}
|
}
|
||||||
}.instrument(span).await;
|
}.instrument(span).await;
|
||||||
} else {
|
} else {
|
||||||
tracing::info!(%user_id, %connection_id, %address, "connection closed");
|
tracing::info!(%user_id, %login, %connection_id, %address, "connection closed");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!(%user_id, %login, %connection_id, %address, "signing out");
|
||||||
if let Err(error) = this.sign_out(connection_id).await {
|
if let Err(error) = this.sign_out(connection_id).await {
|
||||||
tracing::error!(%error, "error signing out");
|
tracing::error!(%user_id, %login, %connection_id, %address, ?error, "error signing out");
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}.instrument(span)
|
}.instrument(span)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(skip(self), err)]
|
||||||
async fn sign_out(self: &mut Arc<Self>, connection_id: ConnectionId) -> Result<()> {
|
async fn sign_out(self: &mut Arc<Self>, connection_id: ConnectionId) -> Result<()> {
|
||||||
self.peer.disconnect(connection_id);
|
self.peer.disconnect(connection_id);
|
||||||
|
|
||||||
|
@ -1528,7 +1532,7 @@ pub async fn handle_websocket_request(
|
||||||
TypedHeader(ProtocolVersion(protocol_version)): TypedHeader<ProtocolVersion>,
|
TypedHeader(ProtocolVersion(protocol_version)): TypedHeader<ProtocolVersion>,
|
||||||
ConnectInfo(socket_address): ConnectInfo<SocketAddr>,
|
ConnectInfo(socket_address): ConnectInfo<SocketAddr>,
|
||||||
Extension(server): Extension<Arc<Server>>,
|
Extension(server): Extension<Arc<Server>>,
|
||||||
Extension(user_id): Extension<UserId>,
|
Extension(user): Extension<User>,
|
||||||
ws: WebSocketUpgrade,
|
ws: WebSocketUpgrade,
|
||||||
) -> axum::response::Response {
|
) -> axum::response::Response {
|
||||||
if protocol_version != rpc::PROTOCOL_VERSION {
|
if protocol_version != rpc::PROTOCOL_VERSION {
|
||||||
|
@ -1548,7 +1552,7 @@ pub async fn handle_websocket_request(
|
||||||
let connection = Connection::new(Box::pin(socket));
|
let connection = Connection::new(Box::pin(socket));
|
||||||
async move {
|
async move {
|
||||||
server
|
server
|
||||||
.handle_connection(connection, socket_address, user_id, None, RealExecutor)
|
.handle_connection(connection, socket_address, user, None, RealExecutor)
|
||||||
.await
|
.await
|
||||||
.log_err();
|
.log_err();
|
||||||
}
|
}
|
||||||
|
@ -3239,7 +3243,7 @@ mod tests {
|
||||||
|
|
||||||
// Type a completion trigger character as the guest.
|
// Type a completion trigger character as the guest.
|
||||||
editor_b.update(cx_b, |editor, cx| {
|
editor_b.update(cx_b, |editor, cx| {
|
||||||
editor.select_ranges([13..13], None, cx);
|
editor.change_selections(None, cx, |s| s.select_ranges([13..13]));
|
||||||
editor.handle_input(&Input(".".into()), cx);
|
editor.handle_input(&Input(".".into()), cx);
|
||||||
cx.focus(&editor_b);
|
cx.focus(&editor_b);
|
||||||
});
|
});
|
||||||
|
@ -4350,7 +4354,9 @@ mod tests {
|
||||||
|
|
||||||
// Move cursor to a location that contains code actions.
|
// Move cursor to a location that contains code actions.
|
||||||
editor_b.update(cx_b, |editor, cx| {
|
editor_b.update(cx_b, |editor, cx| {
|
||||||
editor.select_ranges([Point::new(1, 31)..Point::new(1, 31)], None, cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_ranges([Point::new(1, 31)..Point::new(1, 31)])
|
||||||
|
});
|
||||||
cx.focus(&editor_b);
|
cx.focus(&editor_b);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4576,7 +4582,7 @@ mod tests {
|
||||||
|
|
||||||
// Move cursor to a location that can be renamed.
|
// Move cursor to a location that can be renamed.
|
||||||
let prepare_rename = editor_b.update(cx_b, |editor, cx| {
|
let prepare_rename = editor_b.update(cx_b, |editor, cx| {
|
||||||
editor.select_ranges([7..7], None, cx);
|
editor.change_selections(None, cx, |s| s.select_ranges([7..7]));
|
||||||
editor.rename(&Rename, cx).unwrap()
|
editor.rename(&Rename, cx).unwrap()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5564,8 +5570,12 @@ mod tests {
|
||||||
});
|
});
|
||||||
|
|
||||||
// When client B starts following client A, all visible view states are replicated to client B.
|
// When client B starts following client A, all visible view states are replicated to client B.
|
||||||
editor_a1.update(cx_a, |editor, cx| editor.select_ranges([0..1], None, cx));
|
editor_a1.update(cx_a, |editor, cx| {
|
||||||
editor_a2.update(cx_a, |editor, cx| editor.select_ranges([2..3], None, cx));
|
editor.change_selections(None, cx, |s| s.select_ranges([0..1]))
|
||||||
|
});
|
||||||
|
editor_a2.update(cx_a, |editor, cx| {
|
||||||
|
editor.change_selections(None, cx, |s| s.select_ranges([2..3]))
|
||||||
|
});
|
||||||
workspace_b
|
workspace_b
|
||||||
.update(cx_b, |workspace, cx| {
|
.update(cx_b, |workspace, cx| {
|
||||||
workspace
|
workspace
|
||||||
|
@ -5588,11 +5598,11 @@ mod tests {
|
||||||
Some((worktree_id, "2.txt").into())
|
Some((worktree_id, "2.txt").into())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor_b2.read_with(cx_b, |editor, cx| editor.selected_ranges(cx)),
|
editor_b2.read_with(cx_b, |editor, cx| editor.selections.ranges(cx)),
|
||||||
vec![2..3]
|
vec![2..3]
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor_b1.read_with(cx_b, |editor, cx| editor.selected_ranges(cx)),
|
editor_b1.read_with(cx_b, |editor, cx| editor.selections.ranges(cx)),
|
||||||
vec![0..1]
|
vec![0..1]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -5631,11 +5641,11 @@ mod tests {
|
||||||
|
|
||||||
// Changes to client A's editor are reflected on client B.
|
// Changes to client A's editor are reflected on client B.
|
||||||
editor_a1.update(cx_a, |editor, cx| {
|
editor_a1.update(cx_a, |editor, cx| {
|
||||||
editor.select_ranges([1..1, 2..2], None, cx);
|
editor.change_selections(None, cx, |s| s.select_ranges([1..1, 2..2]));
|
||||||
});
|
});
|
||||||
editor_b1
|
editor_b1
|
||||||
.condition(cx_b, |editor, cx| {
|
.condition(cx_b, |editor, cx| {
|
||||||
editor.selected_ranges(cx) == vec![1..1, 2..2]
|
editor.selections.ranges(cx) == vec![1..1, 2..2]
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
@ -5645,11 +5655,13 @@ mod tests {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
editor_a1.update(cx_a, |editor, cx| {
|
editor_a1.update(cx_a, |editor, cx| {
|
||||||
editor.select_ranges([3..3], None, cx);
|
editor.change_selections(None, cx, |s| s.select_ranges([3..3]));
|
||||||
editor.set_scroll_position(vec2f(0., 100.), cx);
|
editor.set_scroll_position(vec2f(0., 100.), cx);
|
||||||
});
|
});
|
||||||
editor_b1
|
editor_b1
|
||||||
.condition(cx_b, |editor, cx| editor.selected_ranges(cx) == vec![3..3])
|
.condition(cx_b, |editor, cx| {
|
||||||
|
editor.selections.ranges(cx) == vec![3..3]
|
||||||
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
// After unfollowing, client B stops receiving updates from client A.
|
// After unfollowing, client B stops receiving updates from client A.
|
||||||
|
@ -6540,6 +6552,7 @@ mod tests {
|
||||||
let client_name = name.to_string();
|
let client_name = name.to_string();
|
||||||
let mut client = Client::new(http.clone());
|
let mut client = Client::new(http.clone());
|
||||||
let server = self.server.clone();
|
let server = self.server.clone();
|
||||||
|
let db = self.app_state.db.clone();
|
||||||
let connection_killers = self.connection_killers.clone();
|
let connection_killers = self.connection_killers.clone();
|
||||||
let forbid_connections = self.forbid_connections.clone();
|
let forbid_connections = self.forbid_connections.clone();
|
||||||
let (connection_id_tx, mut connection_id_rx) = mpsc::channel(16);
|
let (connection_id_tx, mut connection_id_rx) = mpsc::channel(16);
|
||||||
|
@ -6560,6 +6573,7 @@ mod tests {
|
||||||
assert_eq!(credentials.access_token, "the-token");
|
assert_eq!(credentials.access_token, "the-token");
|
||||||
|
|
||||||
let server = server.clone();
|
let server = server.clone();
|
||||||
|
let db = db.clone();
|
||||||
let connection_killers = connection_killers.clone();
|
let connection_killers = connection_killers.clone();
|
||||||
let forbid_connections = forbid_connections.clone();
|
let forbid_connections = forbid_connections.clone();
|
||||||
let client_name = client_name.clone();
|
let client_name = client_name.clone();
|
||||||
|
@ -6573,11 +6587,12 @@ mod tests {
|
||||||
let (client_conn, server_conn, killed) =
|
let (client_conn, server_conn, killed) =
|
||||||
Connection::in_memory(cx.background());
|
Connection::in_memory(cx.background());
|
||||||
connection_killers.lock().insert(user_id, killed);
|
connection_killers.lock().insert(user_id, killed);
|
||||||
|
let user = db.get_user_by_id(user_id).await.unwrap().unwrap();
|
||||||
cx.background()
|
cx.background()
|
||||||
.spawn(server.handle_connection(
|
.spawn(server.handle_connection(
|
||||||
server_conn,
|
server_conn,
|
||||||
client_name,
|
client_name,
|
||||||
user_id,
|
user,
|
||||||
Some(connection_id_tx),
|
Some(connection_id_tx),
|
||||||
cx.background(),
|
cx.background(),
|
||||||
))
|
))
|
||||||
|
|
|
@ -5,7 +5,7 @@ use collections::{BTreeSet, HashSet};
|
||||||
use editor::{
|
use editor::{
|
||||||
diagnostic_block_renderer,
|
diagnostic_block_renderer,
|
||||||
display_map::{BlockDisposition, BlockId, BlockProperties, RenderBlock},
|
display_map::{BlockDisposition, BlockId, BlockProperties, RenderBlock},
|
||||||
highlight_diagnostic_message, Editor, ExcerptId, MultiBuffer, ToOffset,
|
highlight_diagnostic_message, Autoscroll, Editor, ExcerptId, MultiBuffer, ToOffset,
|
||||||
};
|
};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, elements::*, fonts::TextStyle, serde_json, AnyViewHandle, AppContext, Entity,
|
actions, elements::*, fonts::TextStyle, serde_json, AnyViewHandle, AppContext, Entity,
|
||||||
|
@ -417,8 +417,9 @@ impl ProjectDiagnosticsEditor {
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
groups = self.path_states.get(path_ix)?.diagnostic_groups.as_slice();
|
groups = self.path_states.get(path_ix)?.diagnostic_groups.as_slice();
|
||||||
new_excerpt_ids_by_selection_id = editor.refresh_selections(cx);
|
new_excerpt_ids_by_selection_id =
|
||||||
selections = editor.local_selections::<usize>(cx);
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| s.refresh());
|
||||||
|
selections = editor.selections.all::<usize>(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If any selection has lost its position, move it to start of the next primary diagnostic.
|
// If any selection has lost its position, move it to start of the next primary diagnostic.
|
||||||
|
@ -441,7 +442,9 @@ impl ProjectDiagnosticsEditor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
editor.update_selections(selections, None, cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select(selections);
|
||||||
|
});
|
||||||
Some(())
|
Some(())
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -486,11 +489,11 @@ impl workspace::Item for ProjectDiagnosticsEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_dirty(&self, cx: &AppContext) -> bool {
|
fn is_dirty(&self, cx: &AppContext) -> bool {
|
||||||
self.excerpts.read(cx).read(cx).is_dirty()
|
self.excerpts.read(cx).is_dirty(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has_conflict(&self, cx: &AppContext) -> bool {
|
fn has_conflict(&self, cx: &AppContext) -> bool {
|
||||||
self.excerpts.read(cx).read(cx).has_conflict()
|
self.excerpts.read(cx).has_conflict(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn can_save(&self, _: &AppContext) -> bool {
|
fn can_save(&self, _: &AppContext) -> bool {
|
||||||
|
@ -894,7 +897,7 @@ mod tests {
|
||||||
// Cursor is at the first diagnostic
|
// Cursor is at the first diagnostic
|
||||||
view.editor.update(cx, |editor, cx| {
|
view.editor.update(cx, |editor, cx| {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.selected_display_ranges(cx),
|
editor.selections.display_ranges(cx),
|
||||||
[DisplayPoint::new(12, 6)..DisplayPoint::new(12, 6)]
|
[DisplayPoint::new(12, 6)..DisplayPoint::new(12, 6)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -995,7 +998,7 @@ mod tests {
|
||||||
// Cursor keeps its position.
|
// Cursor keeps its position.
|
||||||
view.editor.update(cx, |editor, cx| {
|
view.editor.update(cx, |editor, cx| {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.selected_display_ranges(cx),
|
editor.selections.display_ranges(cx),
|
||||||
[DisplayPoint::new(19, 6)..DisplayPoint::new(19, 6)]
|
[DisplayPoint::new(19, 6)..DisplayPoint::new(19, 6)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,11 +58,9 @@ impl DiagnosticIndicator {
|
||||||
fn update(&mut self, editor: ViewHandle<Editor>, cx: &mut ViewContext<Self>) {
|
fn update(&mut self, editor: ViewHandle<Editor>, cx: &mut ViewContext<Self>) {
|
||||||
let editor = editor.read(cx);
|
let editor = editor.read(cx);
|
||||||
let buffer = editor.buffer().read(cx);
|
let buffer = editor.buffer().read(cx);
|
||||||
let cursor_position = editor
|
let cursor_position = editor.selections.newest::<usize>(cx).head();
|
||||||
.newest_selection_with_snapshot::<usize>(&buffer.read(cx))
|
|
||||||
.head();
|
|
||||||
let new_diagnostic = buffer
|
let new_diagnostic = buffer
|
||||||
.read(cx)
|
.snapshot(cx)
|
||||||
.diagnostics_in_range::<_, usize>(cursor_position..cursor_position, false)
|
.diagnostics_in_range::<_, usize>(cursor_position..cursor_position, false)
|
||||||
.filter(|entry| !entry.range.is_empty())
|
.filter(|entry| !entry.range.is_empty())
|
||||||
.min_by_key(|entry| (entry.diagnostic.severity, entry.range.len()))
|
.min_by_key(|entry| (entry.diagnostic.severity, entry.range.len()))
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -957,8 +957,10 @@ impl Element for EditorElement {
|
||||||
selections.extend(remote_selections);
|
selections.extend(remote_selections);
|
||||||
|
|
||||||
if view.show_local_selections {
|
if view.show_local_selections {
|
||||||
let local_selections =
|
let mut local_selections = view
|
||||||
view.local_selections_in_range(start_anchor..end_anchor, &display_map);
|
.selections
|
||||||
|
.disjoint_in_range(start_anchor..end_anchor, cx);
|
||||||
|
local_selections.extend(view.selections.pending(cx));
|
||||||
for selection in &local_selections {
|
for selection in &local_selections {
|
||||||
let is_empty = selection.start == selection.end;
|
let is_empty = selection.start == selection.end;
|
||||||
let selection_start = snapshot.prev_line_boundary(selection.start).1;
|
let selection_start = snapshot.prev_line_boundary(selection.start).1;
|
||||||
|
@ -1041,7 +1043,8 @@ impl Element for EditorElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
let newest_selection_head = view
|
let newest_selection_head = view
|
||||||
.newest_selection_with_snapshot::<usize>(&snapshot.buffer_snapshot)
|
.selections
|
||||||
|
.newest::<usize>(cx)
|
||||||
.head()
|
.head()
|
||||||
.to_display_point(&snapshot);
|
.to_display_point(&snapshot);
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ impl FollowableItem for Editor {
|
||||||
} else {
|
} else {
|
||||||
self.buffer.update(cx, |buffer, cx| {
|
self.buffer.update(cx, |buffer, cx| {
|
||||||
if self.focused {
|
if self.focused {
|
||||||
buffer.set_active_selections(&self.selections, cx);
|
buffer.set_active_selections(&self.selections.disjoint_anchors(), cx);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,12 @@ impl FollowableItem for Editor {
|
||||||
)),
|
)),
|
||||||
scroll_x: self.scroll_position.x(),
|
scroll_x: self.scroll_position.x(),
|
||||||
scroll_y: self.scroll_position.y(),
|
scroll_y: self.scroll_position.y(),
|
||||||
selections: self.selections.iter().map(serialize_selection).collect(),
|
selections: self
|
||||||
|
.selections
|
||||||
|
.disjoint_anchors()
|
||||||
|
.iter()
|
||||||
|
.map(serialize_selection)
|
||||||
|
.collect(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +149,9 @@ impl FollowableItem for Editor {
|
||||||
Event::SelectionsChanged { .. } => {
|
Event::SelectionsChanged { .. } => {
|
||||||
update.selections = self
|
update.selections = self
|
||||||
.selections
|
.selections
|
||||||
|
.disjoint_anchors()
|
||||||
.iter()
|
.iter()
|
||||||
.chain(self.pending_selection.as_ref().map(|p| &p.selection))
|
.chain(self.selections.pending_anchor().as_ref())
|
||||||
.map(serialize_selection)
|
.map(serialize_selection)
|
||||||
.collect();
|
.collect();
|
||||||
true
|
true
|
||||||
|
@ -246,13 +252,13 @@ fn deserialize_selection(
|
||||||
impl Item for Editor {
|
impl Item for Editor {
|
||||||
fn navigate(&mut self, data: Box<dyn std::any::Any>, cx: &mut ViewContext<Self>) -> bool {
|
fn navigate(&mut self, data: Box<dyn std::any::Any>, cx: &mut ViewContext<Self>) -> bool {
|
||||||
if let Ok(data) = data.downcast::<NavigationData>() {
|
if let Ok(data) = data.downcast::<NavigationData>() {
|
||||||
|
let newest_selection = self.selections.newest::<Point>(cx);
|
||||||
let buffer = self.buffer.read(cx).read(cx);
|
let buffer = self.buffer.read(cx).read(cx);
|
||||||
let offset = if buffer.can_resolve(&data.cursor_anchor) {
|
let offset = if buffer.can_resolve(&data.cursor_anchor) {
|
||||||
data.cursor_anchor.to_point(&buffer)
|
data.cursor_anchor.to_point(&buffer)
|
||||||
} else {
|
} else {
|
||||||
buffer.clip_point(data.cursor_position, Bias::Left)
|
buffer.clip_point(data.cursor_position, Bias::Left)
|
||||||
};
|
};
|
||||||
let newest_selection = self.newest_selection_with_snapshot::<Point>(&buffer);
|
|
||||||
|
|
||||||
let scroll_top_anchor = if buffer.can_resolve(&data.scroll_top_anchor) {
|
let scroll_top_anchor = if buffer.can_resolve(&data.scroll_top_anchor) {
|
||||||
data.scroll_top_anchor
|
data.scroll_top_anchor
|
||||||
|
@ -270,7 +276,9 @@ impl Item for Editor {
|
||||||
let nav_history = self.nav_history.take();
|
let nav_history = self.nav_history.take();
|
||||||
self.scroll_position = data.scroll_position;
|
self.scroll_position = data.scroll_position;
|
||||||
self.scroll_top_anchor = scroll_top_anchor;
|
self.scroll_top_anchor = scroll_top_anchor;
|
||||||
self.select_ranges([offset..offset], Some(Autoscroll::Fit), cx);
|
self.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.select_ranges([offset..offset])
|
||||||
|
});
|
||||||
self.nav_history = nav_history;
|
self.nav_history = nav_history;
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
@ -307,7 +315,7 @@ impl Item for Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
|
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
|
||||||
let selection = self.newest_anchor_selection();
|
let selection = self.selections.newest_anchor();
|
||||||
self.push_to_nav_history(selection.head(), None, cx);
|
self.push_to_nav_history(selection.head(), None, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +465,7 @@ impl CursorPosition {
|
||||||
|
|
||||||
self.selected_count = 0;
|
self.selected_count = 0;
|
||||||
let mut last_selection: Option<Selection<usize>> = None;
|
let mut last_selection: Option<Selection<usize>> = None;
|
||||||
for selection in editor.local_selections::<usize>(cx) {
|
for selection in editor.selections.all::<usize>(cx) {
|
||||||
self.selected_count += selection.end - selection.start;
|
self.selected_count += selection.end - selection.start;
|
||||||
if last_selection
|
if last_selection
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|
|
@ -226,7 +226,7 @@ impl MultiBuffer {
|
||||||
self.snapshot.borrow().clone()
|
self.snapshot.borrow().clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read(&self, cx: &AppContext) -> Ref<MultiBufferSnapshot> {
|
pub(crate) fn read(&self, cx: &AppContext) -> Ref<MultiBufferSnapshot> {
|
||||||
self.sync(cx);
|
self.sync(cx);
|
||||||
self.snapshot.borrow()
|
self.snapshot.borrow()
|
||||||
}
|
}
|
||||||
|
@ -255,6 +255,27 @@ impl MultiBuffer {
|
||||||
self.subscriptions.subscribe()
|
self.subscriptions.subscribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_dirty(&self, cx: &AppContext) -> bool {
|
||||||
|
self.read(cx).is_dirty()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn has_conflict(&self, cx: &AppContext) -> bool {
|
||||||
|
self.read(cx).has_conflict()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn len(&self, cx: &AppContext) -> usize {
|
||||||
|
self.read(cx).len()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn symbols_containing<T: ToOffset>(
|
||||||
|
&self,
|
||||||
|
offset: T,
|
||||||
|
theme: Option<&SyntaxTheme>,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Option<(usize, Vec<OutlineItem<Anchor>>)> {
|
||||||
|
self.read(cx).symbols_containing(offset, theme)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn edit<I, S, T>(&mut self, edits: I, cx: &mut ModelContext<Self>)
|
pub fn edit<I, S, T>(&mut self, edits: I, cx: &mut ModelContext<Self>)
|
||||||
where
|
where
|
||||||
I: IntoIterator<Item = (Range<S>, T)>,
|
I: IntoIterator<Item = (Range<S>, T)>,
|
||||||
|
|
729
crates/editor/src/selections_collection.rs
Normal file
729
crates/editor/src/selections_collection.rs
Normal file
|
@ -0,0 +1,729 @@
|
||||||
|
use std::{
|
||||||
|
cell::Ref,
|
||||||
|
cmp, iter, mem,
|
||||||
|
ops::{Deref, Range, Sub},
|
||||||
|
sync::Arc,
|
||||||
|
};
|
||||||
|
|
||||||
|
use collections::HashMap;
|
||||||
|
use gpui::{AppContext, ModelHandle, MutableAppContext};
|
||||||
|
use itertools::Itertools;
|
||||||
|
use language::{rope::TextDimension, Bias, Point, Selection, SelectionGoal, ToPoint};
|
||||||
|
use util::post_inc;
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
display_map::{DisplayMap, DisplaySnapshot, ToDisplayPoint},
|
||||||
|
Anchor, DisplayPoint, ExcerptId, MultiBuffer, MultiBufferSnapshot, SelectMode, ToOffset,
|
||||||
|
};
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct PendingSelection {
|
||||||
|
pub selection: Selection<Anchor>,
|
||||||
|
pub mode: SelectMode,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct SelectionsCollection {
|
||||||
|
display_map: ModelHandle<DisplayMap>,
|
||||||
|
buffer: ModelHandle<MultiBuffer>,
|
||||||
|
pub next_selection_id: usize,
|
||||||
|
disjoint: Arc<[Selection<Anchor>]>,
|
||||||
|
pending: Option<PendingSelection>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl SelectionsCollection {
|
||||||
|
pub fn new(display_map: ModelHandle<DisplayMap>, buffer: ModelHandle<MultiBuffer>) -> Self {
|
||||||
|
Self {
|
||||||
|
display_map,
|
||||||
|
buffer,
|
||||||
|
next_selection_id: 1,
|
||||||
|
disjoint: Arc::from([]),
|
||||||
|
pending: Some(PendingSelection {
|
||||||
|
selection: Selection {
|
||||||
|
id: 0,
|
||||||
|
start: Anchor::min(),
|
||||||
|
end: Anchor::min(),
|
||||||
|
reversed: false,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
},
|
||||||
|
mode: SelectMode::Character,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn display_map(&self, cx: &mut MutableAppContext) -> DisplaySnapshot {
|
||||||
|
self.display_map.update(cx, |map, cx| map.snapshot(cx))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn buffer<'a>(&self, cx: &'a AppContext) -> Ref<'a, MultiBufferSnapshot> {
|
||||||
|
self.buffer.read(cx).read(cx)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn count<'a>(&self) -> usize {
|
||||||
|
let mut count = self.disjoint.len();
|
||||||
|
if self.pending.is_some() {
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
|
count
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn disjoint_anchors(&self) -> Arc<[Selection<Anchor>]> {
|
||||||
|
self.disjoint.clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pending_anchor(&self) -> Option<Selection<Anchor>> {
|
||||||
|
self.pending
|
||||||
|
.as_ref()
|
||||||
|
.map(|pending| pending.selection.clone())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pending<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Option<Selection<D>> {
|
||||||
|
self.pending_anchor()
|
||||||
|
.as_ref()
|
||||||
|
.map(|pending| pending.map(|p| p.summary::<D>(&self.buffer(cx))))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pending_mode(&self) -> Option<SelectMode> {
|
||||||
|
self.pending.as_ref().map(|pending| pending.mode.clone())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn all<'a, D>(&self, cx: &AppContext) -> Vec<Selection<D>>
|
||||||
|
where
|
||||||
|
D: 'a + TextDimension + Ord + Sub<D, Output = D> + std::fmt::Debug,
|
||||||
|
{
|
||||||
|
let disjoint_anchors = &self.disjoint;
|
||||||
|
let mut disjoint =
|
||||||
|
resolve_multiple::<D, _>(disjoint_anchors.iter(), &self.buffer(cx)).peekable();
|
||||||
|
|
||||||
|
let mut pending_opt = self.pending::<D>(cx);
|
||||||
|
|
||||||
|
iter::from_fn(move || {
|
||||||
|
if let Some(pending) = pending_opt.as_mut() {
|
||||||
|
while let Some(next_selection) = disjoint.peek() {
|
||||||
|
if pending.start <= next_selection.end && pending.end >= next_selection.start {
|
||||||
|
let next_selection = disjoint.next().unwrap();
|
||||||
|
if next_selection.start < pending.start {
|
||||||
|
pending.start = next_selection.start;
|
||||||
|
}
|
||||||
|
if next_selection.end > pending.end {
|
||||||
|
pending.end = next_selection.end;
|
||||||
|
}
|
||||||
|
} else if next_selection.end < pending.start {
|
||||||
|
return disjoint.next();
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pending_opt.take()
|
||||||
|
} else {
|
||||||
|
disjoint.next()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn disjoint_in_range<'a, D>(
|
||||||
|
&self,
|
||||||
|
range: Range<Anchor>,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Vec<Selection<D>>
|
||||||
|
where
|
||||||
|
D: 'a + TextDimension + Ord + Sub<D, Output = D> + std::fmt::Debug,
|
||||||
|
{
|
||||||
|
let buffer = self.buffer(cx);
|
||||||
|
let start_ix = match self
|
||||||
|
.disjoint
|
||||||
|
.binary_search_by(|probe| probe.end.cmp(&range.start, &buffer))
|
||||||
|
{
|
||||||
|
Ok(ix) | Err(ix) => ix,
|
||||||
|
};
|
||||||
|
let end_ix = match self
|
||||||
|
.disjoint
|
||||||
|
.binary_search_by(|probe| probe.start.cmp(&range.end, &buffer))
|
||||||
|
{
|
||||||
|
Ok(ix) => ix + 1,
|
||||||
|
Err(ix) => ix,
|
||||||
|
};
|
||||||
|
resolve_multiple(&self.disjoint[start_ix..end_ix], &buffer).collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn all_display(
|
||||||
|
&mut self,
|
||||||
|
cx: &mut MutableAppContext,
|
||||||
|
) -> (DisplaySnapshot, Vec<Selection<DisplayPoint>>) {
|
||||||
|
let display_map = self.display_map(cx);
|
||||||
|
let selections = self
|
||||||
|
.all::<Point>(cx)
|
||||||
|
.into_iter()
|
||||||
|
.map(|selection| selection.map(|point| point.to_display_point(&display_map)))
|
||||||
|
.collect();
|
||||||
|
(display_map, selections)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn newest_anchor(&self) -> &Selection<Anchor> {
|
||||||
|
self.pending
|
||||||
|
.as_ref()
|
||||||
|
.map(|s| &s.selection)
|
||||||
|
.or_else(|| self.disjoint.iter().max_by_key(|s| s.id))
|
||||||
|
.unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn newest<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Selection<D> {
|
||||||
|
resolve(self.newest_anchor(), &self.buffer(cx))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn oldest_anchor(&self) -> &Selection<Anchor> {
|
||||||
|
self.disjoint
|
||||||
|
.iter()
|
||||||
|
.min_by_key(|s| s.id)
|
||||||
|
.or_else(|| self.pending.as_ref().map(|p| &p.selection))
|
||||||
|
.unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn oldest<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Selection<D> {
|
||||||
|
resolve(self.oldest_anchor(), &self.buffer(cx))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn first<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Selection<D> {
|
||||||
|
self.all(cx).first().unwrap().clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn last<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Selection<D> {
|
||||||
|
self.all(cx).last().unwrap().clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
|
pub fn ranges<D: TextDimension + Ord + Sub<D, Output = D> + std::fmt::Debug>(
|
||||||
|
&self,
|
||||||
|
cx: &AppContext,
|
||||||
|
) -> Vec<Range<D>> {
|
||||||
|
self.all::<D>(cx)
|
||||||
|
.iter()
|
||||||
|
.map(|s| {
|
||||||
|
if s.reversed {
|
||||||
|
s.end.clone()..s.start.clone()
|
||||||
|
} else {
|
||||||
|
s.start.clone()..s.end.clone()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
|
pub fn display_ranges(&self, cx: &mut MutableAppContext) -> Vec<Range<DisplayPoint>> {
|
||||||
|
let display_map = self.display_map(cx);
|
||||||
|
self.disjoint_anchors()
|
||||||
|
.iter()
|
||||||
|
.chain(self.pending_anchor().as_ref())
|
||||||
|
.map(|s| {
|
||||||
|
if s.reversed {
|
||||||
|
s.end.to_display_point(&display_map)..s.start.to_display_point(&display_map)
|
||||||
|
} else {
|
||||||
|
s.start.to_display_point(&display_map)..s.end.to_display_point(&display_map)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn build_columnar_selection(
|
||||||
|
&mut self,
|
||||||
|
display_map: &DisplaySnapshot,
|
||||||
|
row: u32,
|
||||||
|
columns: &Range<u32>,
|
||||||
|
reversed: bool,
|
||||||
|
) -> Option<Selection<Point>> {
|
||||||
|
let is_empty = columns.start == columns.end;
|
||||||
|
let line_len = display_map.line_len(row);
|
||||||
|
if columns.start < line_len || (is_empty && columns.start == line_len) {
|
||||||
|
let start = DisplayPoint::new(row, columns.start);
|
||||||
|
let end = DisplayPoint::new(row, cmp::min(columns.end, line_len));
|
||||||
|
|
||||||
|
Some(Selection {
|
||||||
|
id: post_inc(&mut self.next_selection_id),
|
||||||
|
start: start.to_point(display_map),
|
||||||
|
end: end.to_point(display_map),
|
||||||
|
reversed,
|
||||||
|
goal: SelectionGoal::ColumnRange {
|
||||||
|
start: columns.start,
|
||||||
|
end: columns.end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn change_with<R>(
|
||||||
|
&mut self,
|
||||||
|
cx: &mut MutableAppContext,
|
||||||
|
change: impl FnOnce(&mut MutableSelectionsCollection) -> R,
|
||||||
|
) -> R {
|
||||||
|
let mut mutable_collection = MutableSelectionsCollection {
|
||||||
|
collection: self,
|
||||||
|
cx,
|
||||||
|
};
|
||||||
|
|
||||||
|
let result = change(&mut mutable_collection);
|
||||||
|
assert!(
|
||||||
|
!mutable_collection.disjoint.is_empty() || mutable_collection.pending.is_some(),
|
||||||
|
"There must be at least one selection"
|
||||||
|
);
|
||||||
|
result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct MutableSelectionsCollection<'a> {
|
||||||
|
collection: &'a mut SelectionsCollection,
|
||||||
|
cx: &'a mut MutableAppContext,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> MutableSelectionsCollection<'a> {
|
||||||
|
fn display_map(&mut self) -> DisplaySnapshot {
|
||||||
|
self.collection.display_map(self.cx)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn buffer(&self) -> Ref<MultiBufferSnapshot> {
|
||||||
|
self.collection.buffer(self.cx)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clear_disjoint(&mut self) {
|
||||||
|
self.collection.disjoint = Arc::from([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn delete(&mut self, selection_id: usize) {
|
||||||
|
self.collection.disjoint = self
|
||||||
|
.disjoint
|
||||||
|
.into_iter()
|
||||||
|
.filter(|selection| selection.id != selection_id)
|
||||||
|
.cloned()
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clear_pending(&mut self) {
|
||||||
|
self.collection.pending = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_pending_range(&mut self, range: Range<Anchor>, mode: SelectMode) {
|
||||||
|
self.collection.pending = Some(PendingSelection {
|
||||||
|
selection: Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start: range.start,
|
||||||
|
end: range.end,
|
||||||
|
reversed: false,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
},
|
||||||
|
mode,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_pending(&mut self, selection: Selection<Anchor>, mode: SelectMode) {
|
||||||
|
self.collection.pending = Some(PendingSelection { selection, mode });
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn try_cancel(&mut self) -> bool {
|
||||||
|
if let Some(pending) = self.collection.pending.take() {
|
||||||
|
if self.disjoint.is_empty() {
|
||||||
|
self.collection.disjoint = Arc::from([pending.selection]);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut oldest = self.oldest_anchor().clone();
|
||||||
|
if self.count() > 1 {
|
||||||
|
self.collection.disjoint = Arc::from([oldest]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if !oldest.start.cmp(&oldest.end, &self.buffer()).is_eq() {
|
||||||
|
let head = oldest.head();
|
||||||
|
oldest.start = head.clone();
|
||||||
|
oldest.end = head;
|
||||||
|
self.collection.disjoint = Arc::from([oldest]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn reset_biases(&mut self) {
|
||||||
|
let buffer = self.buffer.read(self.cx).snapshot(self.cx);
|
||||||
|
self.collection.disjoint = self
|
||||||
|
.collection
|
||||||
|
.disjoint
|
||||||
|
.into_iter()
|
||||||
|
.cloned()
|
||||||
|
.map(|selection| reset_biases(selection, &buffer))
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
if let Some(pending) = self.collection.pending.as_mut() {
|
||||||
|
pending.selection = reset_biases(pending.selection.clone(), &buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn insert_range<T>(&mut self, range: Range<T>)
|
||||||
|
where
|
||||||
|
T: 'a + ToOffset + ToPoint + TextDimension + Ord + Sub<T, Output = T> + std::marker::Copy,
|
||||||
|
{
|
||||||
|
let mut selections = self.all(self.cx);
|
||||||
|
let mut start = range.start.to_offset(&self.buffer());
|
||||||
|
let mut end = range.end.to_offset(&self.buffer());
|
||||||
|
let reversed = if start > end {
|
||||||
|
mem::swap(&mut start, &mut end);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
selections.push(Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
reversed,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
});
|
||||||
|
self.select(selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn select<T>(&mut self, mut selections: Vec<Selection<T>>)
|
||||||
|
where
|
||||||
|
T: ToOffset + ToPoint + Ord + std::marker::Copy + std::fmt::Debug,
|
||||||
|
{
|
||||||
|
let buffer = self.buffer.read(self.cx).snapshot(self.cx);
|
||||||
|
selections.sort_unstable_by_key(|s| s.start);
|
||||||
|
// Merge overlapping selections.
|
||||||
|
let mut i = 1;
|
||||||
|
while i < selections.len() {
|
||||||
|
if selections[i - 1].end >= selections[i].start {
|
||||||
|
let removed = selections.remove(i);
|
||||||
|
if removed.start < selections[i - 1].start {
|
||||||
|
selections[i - 1].start = removed.start;
|
||||||
|
}
|
||||||
|
if removed.end > selections[i - 1].end {
|
||||||
|
selections[i - 1].end = removed.end;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.collection.disjoint = Arc::from_iter(selections.into_iter().map(|selection| {
|
||||||
|
let end_bias = if selection.end > selection.start {
|
||||||
|
Bias::Left
|
||||||
|
} else {
|
||||||
|
Bias::Right
|
||||||
|
};
|
||||||
|
Selection {
|
||||||
|
id: selection.id,
|
||||||
|
start: buffer.anchor_after(selection.start),
|
||||||
|
end: buffer.anchor_at(selection.end, end_bias),
|
||||||
|
reversed: selection.reversed,
|
||||||
|
goal: selection.goal,
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
self.collection.pending = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn select_anchors(&mut self, selections: Vec<Selection<Anchor>>) {
|
||||||
|
let buffer = self.buffer.read(self.cx).snapshot(self.cx);
|
||||||
|
let resolved_selections =
|
||||||
|
resolve_multiple::<usize, _>(&selections, &buffer).collect::<Vec<_>>();
|
||||||
|
self.select(resolved_selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn select_ranges<I, T>(&mut self, ranges: I)
|
||||||
|
where
|
||||||
|
I: IntoIterator<Item = Range<T>>,
|
||||||
|
T: ToOffset,
|
||||||
|
{
|
||||||
|
let buffer = self.buffer.read(self.cx).snapshot(self.cx);
|
||||||
|
let selections = ranges
|
||||||
|
.into_iter()
|
||||||
|
.map(|range| {
|
||||||
|
let mut start = range.start.to_offset(&buffer);
|
||||||
|
let mut end = range.end.to_offset(&buffer);
|
||||||
|
let reversed = if start > end {
|
||||||
|
mem::swap(&mut start, &mut end);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
reversed,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
self.select(selections)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn select_anchor_ranges<I: IntoIterator<Item = Range<Anchor>>>(&mut self, ranges: I) {
|
||||||
|
let buffer = self.buffer.read(self.cx).snapshot(self.cx);
|
||||||
|
let selections = ranges
|
||||||
|
.into_iter()
|
||||||
|
.map(|range| {
|
||||||
|
let mut start = range.start;
|
||||||
|
let mut end = range.end;
|
||||||
|
let reversed = if start.cmp(&end, &buffer).is_gt() {
|
||||||
|
mem::swap(&mut start, &mut end);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
reversed,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
self.select_anchors(selections)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
|
pub fn select_display_ranges<T>(&mut self, ranges: T)
|
||||||
|
where
|
||||||
|
T: IntoIterator<Item = Range<DisplayPoint>>,
|
||||||
|
{
|
||||||
|
let display_map = self.display_map();
|
||||||
|
let selections = ranges
|
||||||
|
.into_iter()
|
||||||
|
.map(|range| {
|
||||||
|
let mut start = range.start;
|
||||||
|
let mut end = range.end;
|
||||||
|
let reversed = if start > end {
|
||||||
|
mem::swap(&mut start, &mut end);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start: start.to_point(&display_map),
|
||||||
|
end: end.to_point(&display_map),
|
||||||
|
reversed,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
self.select(selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn move_with(
|
||||||
|
&mut self,
|
||||||
|
mut move_selection: impl FnMut(&DisplaySnapshot, &mut Selection<DisplayPoint>),
|
||||||
|
) {
|
||||||
|
let display_map = self.display_map();
|
||||||
|
let selections = self
|
||||||
|
.all::<Point>(self.cx)
|
||||||
|
.into_iter()
|
||||||
|
.map(|selection| {
|
||||||
|
let mut selection = selection.map(|point| point.to_display_point(&display_map));
|
||||||
|
move_selection(&display_map, &mut selection);
|
||||||
|
selection.map(|display_point| display_point.to_point(&display_map))
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
self.select(selections)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn move_heads_with(
|
||||||
|
&mut self,
|
||||||
|
mut update_head: impl FnMut(
|
||||||
|
&DisplaySnapshot,
|
||||||
|
DisplayPoint,
|
||||||
|
SelectionGoal,
|
||||||
|
) -> (DisplayPoint, SelectionGoal),
|
||||||
|
) {
|
||||||
|
self.move_with(|map, selection| {
|
||||||
|
let (new_head, new_goal) = update_head(map, selection.head(), selection.goal);
|
||||||
|
selection.set_head(new_head, new_goal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn move_cursors_with(
|
||||||
|
&mut self,
|
||||||
|
mut update_cursor_position: impl FnMut(
|
||||||
|
&DisplaySnapshot,
|
||||||
|
DisplayPoint,
|
||||||
|
SelectionGoal,
|
||||||
|
) -> (DisplayPoint, SelectionGoal),
|
||||||
|
) {
|
||||||
|
self.move_with(|map, selection| {
|
||||||
|
let (cursor, new_goal) = update_cursor_position(map, selection.head(), selection.goal);
|
||||||
|
selection.collapse_to(cursor, new_goal)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn replace_cursors_with(
|
||||||
|
&mut self,
|
||||||
|
mut find_replacement_cursors: impl FnMut(&DisplaySnapshot) -> Vec<DisplayPoint>,
|
||||||
|
) {
|
||||||
|
let display_map = self.display_map();
|
||||||
|
let new_selections = find_replacement_cursors(&display_map)
|
||||||
|
.into_iter()
|
||||||
|
.map(|cursor| {
|
||||||
|
let cursor_point = cursor.to_point(&display_map);
|
||||||
|
Selection {
|
||||||
|
id: post_inc(&mut self.collection.next_selection_id),
|
||||||
|
start: cursor_point,
|
||||||
|
end: cursor_point,
|
||||||
|
reversed: false,
|
||||||
|
goal: SelectionGoal::None,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
self.select(new_selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Compute new ranges for any selections that were located in excerpts that have
|
||||||
|
/// since been removed.
|
||||||
|
///
|
||||||
|
/// Returns a `HashMap` indicating which selections whose former head position
|
||||||
|
/// was no longer present. The keys of the map are selection ids. The values are
|
||||||
|
/// the id of the new excerpt where the head of the selection has been moved.
|
||||||
|
pub fn refresh(&mut self) -> HashMap<usize, ExcerptId> {
|
||||||
|
let mut pending = self.collection.pending.take();
|
||||||
|
let mut selections_with_lost_position = HashMap::default();
|
||||||
|
|
||||||
|
let anchors_with_status = {
|
||||||
|
let buffer = self.buffer();
|
||||||
|
let disjoint_anchors = self
|
||||||
|
.disjoint
|
||||||
|
.iter()
|
||||||
|
.flat_map(|selection| [&selection.start, &selection.end]);
|
||||||
|
buffer.refresh_anchors(disjoint_anchors)
|
||||||
|
};
|
||||||
|
let adjusted_disjoint: Vec<_> = anchors_with_status
|
||||||
|
.chunks(2)
|
||||||
|
.map(|selection_anchors| {
|
||||||
|
let (anchor_ix, start, kept_start) = selection_anchors[0].clone();
|
||||||
|
let (_, end, kept_end) = selection_anchors[1].clone();
|
||||||
|
let selection = &self.disjoint[anchor_ix / 2];
|
||||||
|
let kept_head = if selection.reversed {
|
||||||
|
kept_start
|
||||||
|
} else {
|
||||||
|
kept_end
|
||||||
|
};
|
||||||
|
if !kept_head {
|
||||||
|
selections_with_lost_position
|
||||||
|
.insert(selection.id, selection.head().excerpt_id.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
Selection {
|
||||||
|
id: selection.id,
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
reversed: selection.reversed,
|
||||||
|
goal: selection.goal,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
if !adjusted_disjoint.is_empty() {
|
||||||
|
let resolved_selections =
|
||||||
|
resolve_multiple(adjusted_disjoint.iter(), &self.buffer()).collect();
|
||||||
|
self.select::<usize>(resolved_selections);
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(pending) = pending.as_mut() {
|
||||||
|
let buffer = self.buffer();
|
||||||
|
let anchors =
|
||||||
|
buffer.refresh_anchors([&pending.selection.start, &pending.selection.end]);
|
||||||
|
let (_, start, kept_start) = anchors[0].clone();
|
||||||
|
let (_, end, kept_end) = anchors[1].clone();
|
||||||
|
let kept_head = if pending.selection.reversed {
|
||||||
|
kept_start
|
||||||
|
} else {
|
||||||
|
kept_end
|
||||||
|
};
|
||||||
|
if !kept_head {
|
||||||
|
selections_with_lost_position.insert(
|
||||||
|
pending.selection.id,
|
||||||
|
pending.selection.head().excerpt_id.clone(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
pending.selection.start = start;
|
||||||
|
pending.selection.end = end;
|
||||||
|
}
|
||||||
|
self.collection.pending = pending;
|
||||||
|
|
||||||
|
selections_with_lost_position
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Deref for MutableSelectionsCollection<'a> {
|
||||||
|
type Target = SelectionsCollection;
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
self.collection
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Panics if passed selections are not in order
|
||||||
|
pub fn resolve_multiple<'a, D, I>(
|
||||||
|
selections: I,
|
||||||
|
snapshot: &MultiBufferSnapshot,
|
||||||
|
) -> impl 'a + Iterator<Item = Selection<D>>
|
||||||
|
where
|
||||||
|
D: TextDimension + Ord + Sub<D, Output = D> + std::fmt::Debug,
|
||||||
|
I: 'a + IntoIterator<Item = &'a Selection<Anchor>>,
|
||||||
|
{
|
||||||
|
let (to_summarize, selections) = selections.into_iter().tee();
|
||||||
|
let mut summaries = snapshot
|
||||||
|
.summaries_for_anchors::<D, _>(
|
||||||
|
to_summarize
|
||||||
|
.flat_map(|s| [&s.start, &s.end])
|
||||||
|
.collect::<Vec<_>>(),
|
||||||
|
)
|
||||||
|
.into_iter();
|
||||||
|
selections.map(move |s| Selection {
|
||||||
|
id: s.id,
|
||||||
|
start: summaries.next().unwrap(),
|
||||||
|
end: summaries.next().unwrap(),
|
||||||
|
reversed: s.reversed,
|
||||||
|
goal: s.goal,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn resolve<D: TextDimension + Ord + Sub<D, Output = D>>(
|
||||||
|
selection: &Selection<Anchor>,
|
||||||
|
buffer: &MultiBufferSnapshot,
|
||||||
|
) -> Selection<D> {
|
||||||
|
selection.map(|p| p.summary::<D>(&buffer))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reset_biases(
|
||||||
|
mut selection: Selection<Anchor>,
|
||||||
|
buffer: &MultiBufferSnapshot,
|
||||||
|
) -> Selection<Anchor> {
|
||||||
|
let end_bias = if selection.end.to_offset(buffer) > selection.start.to_offset(buffer) {
|
||||||
|
Bias::Left
|
||||||
|
} else {
|
||||||
|
Bias::Right
|
||||||
|
};
|
||||||
|
selection.start = buffer.anchor_after(selection.start);
|
||||||
|
selection.end = buffer.anchor_at(selection.end, end_bias);
|
||||||
|
selection
|
||||||
|
}
|
|
@ -43,7 +43,7 @@ pub fn marked_display_snapshot(
|
||||||
pub fn select_ranges(editor: &mut Editor, marked_text: &str, cx: &mut ViewContext<Editor>) {
|
pub fn select_ranges(editor: &mut Editor, marked_text: &str, cx: &mut ViewContext<Editor>) {
|
||||||
let (umarked_text, text_ranges) = marked_text_ranges(marked_text);
|
let (umarked_text, text_ranges) = marked_text_ranges(marked_text);
|
||||||
assert_eq!(editor.text(cx), umarked_text);
|
assert_eq!(editor.text(cx), umarked_text);
|
||||||
editor.select_ranges(text_ranges, None, cx);
|
editor.change_selections(None, cx, |s| s.select_ranges(text_ranges));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn assert_text_with_selections(
|
pub fn assert_text_with_selections(
|
||||||
|
@ -54,5 +54,5 @@ pub fn assert_text_with_selections(
|
||||||
let (unmarked_text, text_ranges) = marked_text_ranges(marked_text);
|
let (unmarked_text, text_ranges) = marked_text_ranges(marked_text);
|
||||||
|
|
||||||
assert_eq!(editor.text(cx), unmarked_text);
|
assert_eq!(editor.text(cx), unmarked_text);
|
||||||
assert_eq!(editor.selected_ranges(cx), text_ranges);
|
assert_eq!(editor.selections.ranges(cx), text_ranges);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,10 @@ impl GoToLine {
|
||||||
|
|
||||||
let (scroll_position, cursor_point, max_point) = active_editor.update(cx, |editor, cx| {
|
let (scroll_position, cursor_point, max_point) = active_editor.update(cx, |editor, cx| {
|
||||||
let scroll_position = editor.scroll_position(cx);
|
let scroll_position = editor.scroll_position(cx);
|
||||||
let buffer = editor.buffer().read(cx).read(cx);
|
let buffer = editor.buffer().read(cx).snapshot(cx);
|
||||||
(
|
(
|
||||||
Some(scroll_position),
|
Some(scroll_position),
|
||||||
editor.newest_selection_with_snapshot(&buffer).head(),
|
editor.selections.newest(cx).head(),
|
||||||
buffer.max_point(),
|
buffer.max_point(),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
@ -80,7 +80,9 @@ impl GoToLine {
|
||||||
if let Some(rows) = active_editor.highlighted_rows() {
|
if let Some(rows) = active_editor.highlighted_rows() {
|
||||||
let snapshot = active_editor.snapshot(cx).display_snapshot;
|
let snapshot = active_editor.snapshot(cx).display_snapshot;
|
||||||
let position = DisplayPoint::new(rows.start, 0).to_point(&snapshot);
|
let position = DisplayPoint::new(rows.start, 0).to_point(&snapshot);
|
||||||
active_editor.select_ranges([position..position], Some(Autoscroll::Center), cx);
|
active_editor.change_selections(Some(Autoscroll::Center), cx, |s| {
|
||||||
|
s.select_ranges([position..position])
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cx.emit(Event::Dismissed);
|
cx.emit(Event::Dismissed);
|
||||||
|
@ -106,7 +108,7 @@ impl GoToLine {
|
||||||
match event {
|
match event {
|
||||||
editor::Event::Blurred => cx.emit(Event::Dismissed),
|
editor::Event::Blurred => cx.emit(Event::Dismissed),
|
||||||
editor::Event::BufferEdited { .. } => {
|
editor::Event::BufferEdited { .. } => {
|
||||||
let line_editor = self.line_editor.read(cx).buffer().read(cx).read(cx).text();
|
let line_editor = self.line_editor.read(cx).text(cx);
|
||||||
let mut components = line_editor.trim().split(&[',', ':'][..]);
|
let mut components = line_editor.trim().split(&[',', ':'][..]);
|
||||||
let row = components.next().and_then(|row| row.parse::<u32>().ok());
|
let row = components.next().and_then(|row| row.parse::<u32>().ok());
|
||||||
let column = components.next().and_then(|row| row.parse::<u32>().ok());
|
let column = components.next().and_then(|row| row.parse::<u32>().ok());
|
||||||
|
|
|
@ -1005,6 +1005,13 @@ impl MutableAppContext {
|
||||||
.and_then(|window| window.root_view.clone().downcast::<T>())
|
.and_then(|window| window.root_view.clone().downcast::<T>())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn window_is_active(&self, window_id: usize) -> bool {
|
||||||
|
self.cx
|
||||||
|
.windows
|
||||||
|
.get(&window_id)
|
||||||
|
.map_or(false, |window| window.is_active)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn render_view(
|
pub fn render_view(
|
||||||
&mut self,
|
&mut self,
|
||||||
window_id: usize,
|
window_id: usize,
|
||||||
|
|
|
@ -122,8 +122,10 @@ impl Presenter {
|
||||||
self.text_layout_cache.finish_frame();
|
self.text_layout_cache.finish_frame();
|
||||||
self.cursor_styles = scene.cursor_styles();
|
self.cursor_styles = scene.cursor_styles();
|
||||||
|
|
||||||
if let Some(event) = self.last_mouse_moved_event.clone() {
|
if cx.window_is_active(self.window_id) {
|
||||||
self.dispatch_event(event, cx)
|
if let Some(event) = self.last_mouse_moved_event.clone() {
|
||||||
|
self.dispatch_event(event, cx)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log::error!("could not find root_view_id for window {}", self.window_id);
|
log::error!("could not find root_view_id for window {}", self.window_id);
|
||||||
|
|
|
@ -56,8 +56,10 @@ pub fn new_journal_entry(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
|
||||||
if let Some(Some(Ok(item))) = opened.first() {
|
if let Some(Some(Ok(item))) = opened.first() {
|
||||||
if let Some(editor) = item.downcast::<Editor>() {
|
if let Some(editor) = item.downcast::<Editor>() {
|
||||||
editor.update(&mut cx, |editor, cx| {
|
editor.update(&mut cx, |editor, cx| {
|
||||||
let len = editor.buffer().read(cx).read(cx).len();
|
let len = editor.buffer().read(cx).len(cx);
|
||||||
editor.select_ranges([len..len], Some(Autoscroll::Center), cx);
|
editor.change_selections(Some(Autoscroll::Center), cx, |s| {
|
||||||
|
s.select_ranges([len..len])
|
||||||
|
});
|
||||||
if len > 0 {
|
if len > 0 {
|
||||||
editor.insert("\n\n", cx);
|
editor.insert("\n\n", cx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ impl OutlineView {
|
||||||
.read(cx)
|
.read(cx)
|
||||||
.buffer()
|
.buffer()
|
||||||
.read(cx)
|
.read(cx)
|
||||||
.read(cx)
|
.snapshot(cx)
|
||||||
.outline(Some(cx.global::<Settings>().theme.editor.syntax.as_ref()));
|
.outline(Some(cx.global::<Settings>().theme.editor.syntax.as_ref()));
|
||||||
if let Some(outline) = buffer {
|
if let Some(outline) = buffer {
|
||||||
workspace.toggle_modal(cx, |_, cx| {
|
workspace.toggle_modal(cx, |_, cx| {
|
||||||
|
@ -171,10 +171,8 @@ impl PickerDelegate for OutlineView {
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let editor = self.active_editor.read(cx);
|
let editor = self.active_editor.read(cx);
|
||||||
let buffer = editor.buffer().read(cx).read(cx);
|
let cursor_offset = editor.selections.newest::<usize>(cx).head();
|
||||||
let cursor_offset = editor
|
let buffer = editor.buffer().read(cx).snapshot(cx);
|
||||||
.newest_selection_with_snapshot::<usize>(&buffer)
|
|
||||||
.head();
|
|
||||||
selected_index = self
|
selected_index = self
|
||||||
.outline
|
.outline
|
||||||
.items
|
.items
|
||||||
|
@ -217,7 +215,9 @@ impl PickerDelegate for OutlineView {
|
||||||
if let Some(rows) = active_editor.highlighted_rows() {
|
if let Some(rows) = active_editor.highlighted_rows() {
|
||||||
let snapshot = active_editor.snapshot(cx).display_snapshot;
|
let snapshot = active_editor.snapshot(cx).display_snapshot;
|
||||||
let position = DisplayPoint::new(rows.start, 0).to_point(&snapshot);
|
let position = DisplayPoint::new(rows.start, 0).to_point(&snapshot);
|
||||||
active_editor.select_ranges([position..position], Some(Autoscroll::Center), cx);
|
active_editor.change_selections(Some(Autoscroll::Center), cx, |s| {
|
||||||
|
s.select_ranges([position..position])
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cx.emit(Event::Dismissed);
|
cx.emit(Event::Dismissed);
|
||||||
|
|
|
@ -145,11 +145,9 @@ impl ProjectSymbolsView {
|
||||||
|
|
||||||
let editor = workspace.open_project_item::<Editor>(buffer, cx);
|
let editor = workspace.open_project_item::<Editor>(buffer, cx);
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_ranges(
|
editor.change_selections(Some(Autoscroll::Center), cx, |s| {
|
||||||
[position..position],
|
s.select_ranges([position..position])
|
||||||
Some(Autoscroll::Center),
|
});
|
||||||
cx,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Ok::<_, anyhow::Error>(())
|
Ok::<_, anyhow::Error>(())
|
||||||
|
|
|
@ -21,13 +21,13 @@ async-lock = "2.4"
|
||||||
async-tungstenite = "0.16"
|
async-tungstenite = "0.16"
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
prost = "0.8"
|
prost = "0.8"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
rsa = "0.4"
|
rsa = "0.4"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
smol-timeout = "0.6"
|
smol-timeout = "0.6"
|
||||||
|
tracing = { version = "0.1.34", features = ["log"] }
|
||||||
zstd = "0.9"
|
zstd = "0.9"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -22,6 +22,7 @@ use std::{
|
||||||
},
|
},
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
use tracing::instrument;
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||||
pub struct ConnectionId(pub u32);
|
pub struct ConnectionId(pub u32);
|
||||||
|
@ -108,6 +109,7 @@ impl Peer {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(skip_all)]
|
||||||
pub async fn add_connection<F, Fut, Out>(
|
pub async fn add_connection<F, Fut, Out>(
|
||||||
self: &Arc<Self>,
|
self: &Arc<Self>,
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
|
@ -145,9 +147,12 @@ impl Peer {
|
||||||
let this = self.clone();
|
let this = self.clone();
|
||||||
let response_channels = connection_state.response_channels.clone();
|
let response_channels = connection_state.response_channels.clone();
|
||||||
let handle_io = async move {
|
let handle_io = async move {
|
||||||
|
tracing::debug!(%connection_id, "handle io future: start");
|
||||||
|
|
||||||
let _end_connection = util::defer(|| {
|
let _end_connection = util::defer(|| {
|
||||||
response_channels.lock().take();
|
response_channels.lock().take();
|
||||||
this.connections.write().remove(&connection_id);
|
this.connections.write().remove(&connection_id);
|
||||||
|
tracing::debug!(%connection_id, "handle io future: end");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Send messages on this frequency so the connection isn't closed.
|
// Send messages on this frequency so the connection isn't closed.
|
||||||
|
@ -159,49 +164,68 @@ impl Peer {
|
||||||
futures::pin_mut!(receive_timeout);
|
futures::pin_mut!(receive_timeout);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
tracing::debug!(%connection_id, "outer loop iteration start");
|
||||||
let read_message = reader.read().fuse();
|
let read_message = reader.read().fuse();
|
||||||
futures::pin_mut!(read_message);
|
futures::pin_mut!(read_message);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
tracing::debug!(%connection_id, "inner loop iteration start");
|
||||||
futures::select_biased! {
|
futures::select_biased! {
|
||||||
outgoing = outgoing_rx.next().fuse() => match outgoing {
|
outgoing = outgoing_rx.next().fuse() => match outgoing {
|
||||||
Some(outgoing) => {
|
Some(outgoing) => {
|
||||||
|
tracing::debug!(%connection_id, "outgoing rpc message: writing");
|
||||||
if let Some(result) = writer.write(outgoing).timeout(WRITE_TIMEOUT).await {
|
if let Some(result) = writer.write(outgoing).timeout(WRITE_TIMEOUT).await {
|
||||||
|
tracing::debug!(%connection_id, "outgoing rpc message: done writing");
|
||||||
result.context("failed to write RPC message")?;
|
result.context("failed to write RPC message")?;
|
||||||
|
tracing::debug!(%connection_id, "keepalive interval: resetting after sending message");
|
||||||
keepalive_timer.set(create_timer(KEEPALIVE_INTERVAL).fuse());
|
keepalive_timer.set(create_timer(KEEPALIVE_INTERVAL).fuse());
|
||||||
} else {
|
} else {
|
||||||
|
tracing::debug!(%connection_id, "outgoing rpc message: writing timed out");
|
||||||
Err(anyhow!("timed out writing message"))?;
|
Err(anyhow!("timed out writing message"))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
log::info!("outgoing channel closed");
|
tracing::debug!(%connection_id, "outgoing rpc message: channel closed");
|
||||||
return Ok(())
|
return Ok(())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
incoming = read_message => {
|
incoming = read_message => {
|
||||||
let incoming = incoming.context("received invalid RPC message")?;
|
let incoming = incoming.context("error reading rpc message from socket")?;
|
||||||
|
tracing::debug!(%connection_id, "incoming rpc message: received");
|
||||||
|
tracing::debug!(%connection_id, "receive timeout: resetting");
|
||||||
receive_timeout.set(create_timer(RECEIVE_TIMEOUT).fuse());
|
receive_timeout.set(create_timer(RECEIVE_TIMEOUT).fuse());
|
||||||
if let proto::Message::Envelope(incoming) = incoming {
|
if let proto::Message::Envelope(incoming) = incoming {
|
||||||
|
tracing::debug!(%connection_id, "incoming rpc message: processing");
|
||||||
match incoming_tx.send(incoming).timeout(RECEIVE_TIMEOUT).await {
|
match incoming_tx.send(incoming).timeout(RECEIVE_TIMEOUT).await {
|
||||||
Some(Ok(_)) => {},
|
Some(Ok(_)) => {
|
||||||
|
tracing::debug!(%connection_id, "incoming rpc message: processed");
|
||||||
|
},
|
||||||
Some(Err(_)) => {
|
Some(Err(_)) => {
|
||||||
log::info!("incoming channel closed");
|
tracing::debug!(%connection_id, "incoming rpc message: channel closed");
|
||||||
return Ok(())
|
return Ok(())
|
||||||
},
|
},
|
||||||
None => Err(anyhow!("timed out processing incoming message"))?,
|
None => {
|
||||||
|
tracing::debug!(%connection_id, "incoming rpc message: processing timed out");
|
||||||
|
Err(anyhow!("timed out processing incoming message"))?
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
_ = keepalive_timer => {
|
_ = keepalive_timer => {
|
||||||
|
tracing::debug!(%connection_id, "keepalive interval: pinging");
|
||||||
if let Some(result) = writer.write(proto::Message::Ping).timeout(WRITE_TIMEOUT).await {
|
if let Some(result) = writer.write(proto::Message::Ping).timeout(WRITE_TIMEOUT).await {
|
||||||
|
tracing::debug!(%connection_id, "keepalive interval: done pinging");
|
||||||
result.context("failed to send keepalive")?;
|
result.context("failed to send keepalive")?;
|
||||||
|
tracing::debug!(%connection_id, "keepalive interval: resetting after pinging");
|
||||||
keepalive_timer.set(create_timer(KEEPALIVE_INTERVAL).fuse());
|
keepalive_timer.set(create_timer(KEEPALIVE_INTERVAL).fuse());
|
||||||
} else {
|
} else {
|
||||||
|
tracing::debug!(%connection_id, "keepalive interval: pinging timed out");
|
||||||
Err(anyhow!("timed out sending keepalive"))?;
|
Err(anyhow!("timed out sending keepalive"))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ = receive_timeout => {
|
_ = receive_timeout => {
|
||||||
|
tracing::debug!(%connection_id, "receive timeout: delay between messages too long");
|
||||||
Err(anyhow!("delay between messages too long"))?
|
Err(anyhow!("delay between messages too long"))?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,25 +241,71 @@ impl Peer {
|
||||||
let incoming_rx = incoming_rx.filter_map(move |incoming| {
|
let incoming_rx = incoming_rx.filter_map(move |incoming| {
|
||||||
let response_channels = response_channels.clone();
|
let response_channels = response_channels.clone();
|
||||||
async move {
|
async move {
|
||||||
|
let message_id = incoming.id;
|
||||||
|
tracing::debug!(?incoming, "incoming message future: start");
|
||||||
|
let _end = util::defer(move || {
|
||||||
|
tracing::debug!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
"incoming message future: end"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
if let Some(responding_to) = incoming.responding_to {
|
if let Some(responding_to) = incoming.responding_to {
|
||||||
|
tracing::debug!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
responding_to,
|
||||||
|
"incoming response: received"
|
||||||
|
);
|
||||||
let channel = response_channels.lock().as_mut()?.remove(&responding_to);
|
let channel = response_channels.lock().as_mut()?.remove(&responding_to);
|
||||||
if let Some(tx) = channel {
|
if let Some(tx) = channel {
|
||||||
let requester_resumed = oneshot::channel();
|
let requester_resumed = oneshot::channel();
|
||||||
if let Err(error) = tx.send((incoming, requester_resumed.0)) {
|
if let Err(error) = tx.send((incoming, requester_resumed.0)) {
|
||||||
log::debug!(
|
tracing::debug!(
|
||||||
"received RPC but request future was dropped {:?}",
|
%connection_id,
|
||||||
error.0
|
message_id,
|
||||||
|
responding_to = responding_to,
|
||||||
|
?error,
|
||||||
|
"incoming response: request future dropped",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::debug!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
responding_to,
|
||||||
|
"incoming response: waiting to resume requester"
|
||||||
|
);
|
||||||
let _ = requester_resumed.1.await;
|
let _ = requester_resumed.1.await;
|
||||||
|
tracing::debug!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
responding_to,
|
||||||
|
"incoming response: requester resumed"
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
log::warn!("received RPC response to unknown request {}", responding_to);
|
tracing::warn!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
responding_to,
|
||||||
|
"incoming response: unknown request"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
|
tracing::debug!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
"incoming message: received"
|
||||||
|
);
|
||||||
proto::build_typed_envelope(connection_id, incoming).or_else(|| {
|
proto::build_typed_envelope(connection_id, incoming).or_else(|| {
|
||||||
log::error!("unable to construct a typed envelope");
|
tracing::error!(
|
||||||
|
%connection_id,
|
||||||
|
message_id,
|
||||||
|
"unable to construct a typed envelope"
|
||||||
|
);
|
||||||
None
|
None
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,9 +225,7 @@ impl BufferSearchBar {
|
||||||
let display_map = editor
|
let display_map = editor
|
||||||
.update(cx, |editor, cx| editor.snapshot(cx))
|
.update(cx, |editor, cx| editor.snapshot(cx))
|
||||||
.display_snapshot;
|
.display_snapshot;
|
||||||
let selection = editor
|
let selection = editor.read(cx).selections.newest::<usize>(cx);
|
||||||
.read(cx)
|
|
||||||
.newest_selection_with_snapshot::<usize>(&display_map.buffer_snapshot);
|
|
||||||
|
|
||||||
let mut text: String;
|
let mut text: String;
|
||||||
if selection.start == selection.end {
|
if selection.start == selection.end {
|
||||||
|
@ -267,7 +265,7 @@ impl BufferSearchBar {
|
||||||
fn set_query(&mut self, query: &str, cx: &mut ViewContext<Self>) {
|
fn set_query(&mut self, query: &str, cx: &mut ViewContext<Self>) {
|
||||||
self.query_editor.update(cx, |query_editor, cx| {
|
self.query_editor.update(cx, |query_editor, cx| {
|
||||||
query_editor.buffer().update(cx, |query_buffer, cx| {
|
query_editor.buffer().update(cx, |query_buffer, cx| {
|
||||||
let len = query_buffer.read(cx).len();
|
let len = query_buffer.len(cx);
|
||||||
query_buffer.edit([(0..len, query)], cx);
|
query_buffer.edit([(0..len, query)], cx);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -387,14 +385,16 @@ impl BufferSearchBar {
|
||||||
if let Some(ranges) = self.editors_with_matches.get(&cx.weak_handle()) {
|
if let Some(ranges) = self.editors_with_matches.get(&cx.weak_handle()) {
|
||||||
let new_index = match_index_for_direction(
|
let new_index = match_index_for_direction(
|
||||||
ranges,
|
ranges,
|
||||||
&editor.newest_anchor_selection().head(),
|
&editor.selections.newest_anchor().head(),
|
||||||
index,
|
index,
|
||||||
direction,
|
direction,
|
||||||
&editor.buffer().read(cx).read(cx),
|
&editor.buffer().read(cx).snapshot(cx),
|
||||||
);
|
);
|
||||||
let range_to_select = ranges[new_index].clone();
|
let range_to_select = ranges[new_index].clone();
|
||||||
editor.unfold_ranges([range_to_select.clone()], false, cx);
|
editor.unfold_ranges([range_to_select.clone()], false, cx);
|
||||||
editor.select_ranges([range_to_select], Some(Autoscroll::Fit), cx);
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.select_ranges([range_to_select])
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -535,10 +535,10 @@ impl BufferSearchBar {
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
if select_closest_match {
|
if select_closest_match {
|
||||||
if let Some(match_ix) = this.active_match_index {
|
if let Some(match_ix) = this.active_match_index {
|
||||||
editor.select_ranges(
|
editor.change_selections(
|
||||||
[ranges[match_ix].clone()],
|
|
||||||
Some(Autoscroll::Fit),
|
Some(Autoscroll::Fit),
|
||||||
cx,
|
cx,
|
||||||
|
|s| s.select_ranges([ranges[match_ix].clone()]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -564,8 +564,8 @@ impl BufferSearchBar {
|
||||||
let editor = editor.read(cx);
|
let editor = editor.read(cx);
|
||||||
active_match_index(
|
active_match_index(
|
||||||
&ranges,
|
&ranges,
|
||||||
&editor.newest_anchor_selection().head(),
|
&editor.selections.newest_anchor().head(),
|
||||||
&editor.buffer().read(cx).read(cx),
|
&editor.buffer().read(cx).snapshot(cx),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
if new_index != self.active_match_index {
|
if new_index != self.active_match_index {
|
||||||
|
@ -721,13 +721,15 @@ mod tests {
|
||||||
});
|
});
|
||||||
|
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(0, 0)..DisplayPoint::new(0, 0)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(0, 0)..DisplayPoint::new(0, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(0));
|
assert_eq!(search_bar.active_match_index, Some(0));
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -738,7 +740,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -749,7 +751,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -760,7 +762,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -771,7 +773,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -782,7 +784,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -793,7 +795,7 @@ mod tests {
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -804,13 +806,15 @@ mod tests {
|
||||||
// Park the cursor in between matches and ensure that going to the previous match selects
|
// Park the cursor in between matches and ensure that going to the previous match selects
|
||||||
// the closest match to the left.
|
// the closest match to the left.
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(1));
|
assert_eq!(search_bar.active_match_index, Some(1));
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -821,13 +825,15 @@ mod tests {
|
||||||
// Park the cursor in between matches and ensure that going to the next match selects the
|
// Park the cursor in between matches and ensure that going to the next match selects the
|
||||||
// closest match to the right.
|
// closest match to the right.
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(1));
|
assert_eq!(search_bar.active_match_index, Some(1));
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
[DisplayPoint::new(3, 11)..DisplayPoint::new(3, 13)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -838,13 +844,15 @@ mod tests {
|
||||||
// Park the cursor after the last match and ensure that going to the previous match selects
|
// Park the cursor after the last match and ensure that going to the previous match selects
|
||||||
// the last match.
|
// the last match.
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(3, 60)..DisplayPoint::new(3, 60)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(3, 60)..DisplayPoint::new(3, 60)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(2));
|
assert_eq!(search_bar.active_match_index, Some(2));
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -855,13 +863,15 @@ mod tests {
|
||||||
// Park the cursor after the last match and ensure that going to the next match selects the
|
// Park the cursor after the last match and ensure that going to the next match selects the
|
||||||
// first match.
|
// first match.
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(3, 60)..DisplayPoint::new(3, 60)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(3, 60)..DisplayPoint::new(3, 60)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(2));
|
assert_eq!(search_bar.active_match_index, Some(2));
|
||||||
search_bar.select_next_match(&SelectNextMatch, cx);
|
search_bar.select_next_match(&SelectNextMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
[DisplayPoint::new(0, 41)..DisplayPoint::new(0, 43)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -872,13 +882,15 @@ mod tests {
|
||||||
// Park the cursor before the first match and ensure that going to the previous match
|
// Park the cursor before the first match and ensure that going to the previous match
|
||||||
// selects the last match.
|
// selects the last match.
|
||||||
editor.update(cx, |editor, cx| {
|
editor.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(0, 0)..DisplayPoint::new(0, 0)], cx);
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(0, 0)..DisplayPoint::new(0, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
search_bar.update(cx, |search_bar, cx| {
|
search_bar.update(cx, |search_bar, cx| {
|
||||||
assert_eq!(search_bar.active_match_index, Some(0));
|
assert_eq!(search_bar.active_match_index, Some(0));
|
||||||
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
search_bar.select_prev_match(&SelectPrevMatch, cx);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
editor.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
editor.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
[DisplayPoint::new(3, 56)..DisplayPoint::new(3, 58)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -454,15 +454,17 @@ impl ProjectSearchView {
|
||||||
let results_editor = self.results_editor.read(cx);
|
let results_editor = self.results_editor.read(cx);
|
||||||
let new_index = match_index_for_direction(
|
let new_index = match_index_for_direction(
|
||||||
&model.match_ranges,
|
&model.match_ranges,
|
||||||
&results_editor.newest_anchor_selection().head(),
|
&results_editor.selections.newest_anchor().head(),
|
||||||
index,
|
index,
|
||||||
direction,
|
direction,
|
||||||
&results_editor.buffer().read(cx).read(cx),
|
&results_editor.buffer().read(cx).snapshot(cx),
|
||||||
);
|
);
|
||||||
let range_to_select = model.match_ranges[new_index].clone();
|
let range_to_select = model.match_ranges[new_index].clone();
|
||||||
self.results_editor.update(cx, |editor, cx| {
|
self.results_editor.update(cx, |editor, cx| {
|
||||||
editor.unfold_ranges([range_to_select.clone()], false, cx);
|
editor.unfold_ranges([range_to_select.clone()], false, cx);
|
||||||
editor.select_ranges([range_to_select], Some(Autoscroll::Fit), cx);
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.select_ranges([range_to_select])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,8 +478,8 @@ impl ProjectSearchView {
|
||||||
|
|
||||||
fn focus_results_editor(&self, cx: &mut ViewContext<Self>) {
|
fn focus_results_editor(&self, cx: &mut ViewContext<Self>) {
|
||||||
self.query_editor.update(cx, |query_editor, cx| {
|
self.query_editor.update(cx, |query_editor, cx| {
|
||||||
let cursor = query_editor.newest_anchor_selection().head();
|
let cursor = query_editor.selections.newest_anchor().head();
|
||||||
query_editor.select_ranges([cursor.clone()..cursor], None, cx);
|
query_editor.change_selections(None, cx, |s| s.select_ranges([cursor.clone()..cursor]));
|
||||||
});
|
});
|
||||||
cx.focus(&self.results_editor);
|
cx.focus(&self.results_editor);
|
||||||
}
|
}
|
||||||
|
@ -489,7 +491,9 @@ impl ProjectSearchView {
|
||||||
} else {
|
} else {
|
||||||
self.results_editor.update(cx, |editor, cx| {
|
self.results_editor.update(cx, |editor, cx| {
|
||||||
if reset_selections {
|
if reset_selections {
|
||||||
editor.select_ranges(match_ranges.first().cloned(), Some(Autoscroll::Fit), cx);
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.select_ranges(match_ranges.first().cloned())
|
||||||
|
});
|
||||||
}
|
}
|
||||||
editor.highlight_background::<Self>(
|
editor.highlight_background::<Self>(
|
||||||
match_ranges,
|
match_ranges,
|
||||||
|
@ -510,8 +514,8 @@ impl ProjectSearchView {
|
||||||
let results_editor = self.results_editor.read(cx);
|
let results_editor = self.results_editor.read(cx);
|
||||||
let new_index = active_match_index(
|
let new_index = active_match_index(
|
||||||
&self.model.read(cx).match_ranges,
|
&self.model.read(cx).match_ranges,
|
||||||
&results_editor.newest_anchor_selection().head(),
|
&results_editor.selections.newest_anchor().head(),
|
||||||
&results_editor.buffer().read(cx).read(cx),
|
&results_editor.buffer().read(cx).snapshot(cx),
|
||||||
);
|
);
|
||||||
if self.active_match_index != new_index {
|
if self.active_match_index != new_index {
|
||||||
self.active_match_index = new_index;
|
self.active_match_index = new_index;
|
||||||
|
@ -887,7 +891,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(2, 32)..DisplayPoint::new(2, 35)]
|
[DisplayPoint::new(2, 32)..DisplayPoint::new(2, 35)]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -899,7 +903,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(2, 37)..DisplayPoint::new(2, 40)]
|
[DisplayPoint::new(2, 37)..DisplayPoint::new(2, 40)]
|
||||||
);
|
);
|
||||||
search_view.select_match(Direction::Next, cx);
|
search_view.select_match(Direction::Next, cx);
|
||||||
|
@ -910,7 +914,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(5, 6)..DisplayPoint::new(5, 9)]
|
[DisplayPoint::new(5, 6)..DisplayPoint::new(5, 9)]
|
||||||
);
|
);
|
||||||
search_view.select_match(Direction::Next, cx);
|
search_view.select_match(Direction::Next, cx);
|
||||||
|
@ -921,7 +925,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(2, 32)..DisplayPoint::new(2, 35)]
|
[DisplayPoint::new(2, 32)..DisplayPoint::new(2, 35)]
|
||||||
);
|
);
|
||||||
search_view.select_match(Direction::Prev, cx);
|
search_view.select_match(Direction::Prev, cx);
|
||||||
|
@ -932,7 +936,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(5, 6)..DisplayPoint::new(5, 9)]
|
[DisplayPoint::new(5, 6)..DisplayPoint::new(5, 9)]
|
||||||
);
|
);
|
||||||
search_view.select_match(Direction::Prev, cx);
|
search_view.select_match(Direction::Prev, cx);
|
||||||
|
@ -943,7 +947,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
search_view
|
search_view
|
||||||
.results_editor
|
.results_editor
|
||||||
.update(cx, |editor, cx| editor.selected_display_ranges(cx)),
|
.update(cx, |editor, cx| editor.selections.display_ranges(cx)),
|
||||||
[DisplayPoint::new(2, 37)..DisplayPoint::new(2, 40)]
|
[DisplayPoint::new(2, 37)..DisplayPoint::new(2, 40)]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::{collections::HashMap, sync::Arc};
|
||||||
|
|
||||||
pub use theme_registry::*;
|
pub use theme_registry::*;
|
||||||
|
|
||||||
pub const DEFAULT_THEME_NAME: &'static str = "dark";
|
pub const DEFAULT_THEME_NAME: &'static str = "cave-dark";
|
||||||
|
|
||||||
#[derive(Deserialize, Default)]
|
#[derive(Deserialize, Default)]
|
||||||
pub struct Theme {
|
pub struct Theme {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::{state::Mode, Vim};
|
use crate::{state::Mode, Vim};
|
||||||
use editor::Bias;
|
use editor::{Autoscroll, Bias};
|
||||||
use gpui::{actions, MutableAppContext, ViewContext};
|
use gpui::{actions, MutableAppContext, ViewContext};
|
||||||
use language::SelectionGoal;
|
use language::SelectionGoal;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
@ -13,9 +13,11 @@ pub fn init(cx: &mut MutableAppContext) {
|
||||||
fn normal_before(_: &mut Workspace, _: &NormalBefore, cx: &mut ViewContext<Workspace>) {
|
fn normal_before(_: &mut Workspace, _: &NormalBefore, cx: &mut ViewContext<Workspace>) {
|
||||||
Vim::update(cx, |state, cx| {
|
Vim::update(cx, |state, cx| {
|
||||||
state.update_active_editor(cx, |editor, cx| {
|
state.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_cursors(cx, |map, mut cursor, _| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
*cursor.column_mut() = cursor.column().saturating_sub(1);
|
s.move_cursors_with(|map, mut cursor, _| {
|
||||||
(map.clip_point(cursor, Bias::Left), SelectionGoal::None)
|
*cursor.column_mut() = cursor.column().saturating_sub(1);
|
||||||
|
(map.clip_point(cursor, Bias::Left), SelectionGoal::None)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
state.switch_mode(Mode::Normal, cx);
|
state.switch_mode(Mode::Normal, cx);
|
||||||
|
|
|
@ -8,7 +8,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
use change::init as change_init;
|
use change::init as change_init;
|
||||||
use collections::HashSet;
|
use collections::HashSet;
|
||||||
use editor::{Bias, DisplayPoint};
|
use editor::{Autoscroll, Bias, DisplayPoint};
|
||||||
use gpui::{actions, MutableAppContext, ViewContext};
|
use gpui::{actions, MutableAppContext, ViewContext};
|
||||||
use language::SelectionGoal;
|
use language::SelectionGoal;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
@ -76,7 +76,9 @@ pub fn normal_motion(motion: Motion, cx: &mut MutableAppContext) {
|
||||||
|
|
||||||
fn move_cursor(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
fn move_cursor(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_cursors(cx, |map, cursor, goal| motion.move_point(map, cursor, goal))
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.move_cursors_with(|map, cursor, goal| motion.move_point(map, cursor, goal))
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,8 +86,10 @@ fn insert_after(_: &mut Workspace, _: &InsertAfter, cx: &mut ViewContext<Workspa
|
||||||
Vim::update(cx, |vim, cx| {
|
Vim::update(cx, |vim, cx| {
|
||||||
vim.switch_mode(Mode::Insert, cx);
|
vim.switch_mode(Mode::Insert, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_cursors(cx, |map, cursor, goal| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
Motion::Right.move_point(map, cursor, goal)
|
s.move_cursors_with(|map, cursor, goal| {
|
||||||
|
Motion::Right.move_point(map, cursor, goal)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -99,8 +103,10 @@ fn insert_first_non_whitespace(
|
||||||
Vim::update(cx, |vim, cx| {
|
Vim::update(cx, |vim, cx| {
|
||||||
vim.switch_mode(Mode::Insert, cx);
|
vim.switch_mode(Mode::Insert, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_cursors(cx, |map, cursor, goal| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
Motion::FirstNonWhitespace.move_point(map, cursor, goal)
|
s.move_cursors_with(|map, cursor, goal| {
|
||||||
|
Motion::FirstNonWhitespace.move_point(map, cursor, goal)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -110,8 +116,10 @@ fn insert_end_of_line(_: &mut Workspace, _: &InsertEndOfLine, cx: &mut ViewConte
|
||||||
Vim::update(cx, |vim, cx| {
|
Vim::update(cx, |vim, cx| {
|
||||||
vim.switch_mode(Mode::Insert, cx);
|
vim.switch_mode(Mode::Insert, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_cursors(cx, |map, cursor, goal| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
Motion::EndOfLine.move_point(map, cursor, goal)
|
s.move_cursors_with(|map, cursor, goal| {
|
||||||
|
Motion::EndOfLine.move_point(map, cursor, goal)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -122,7 +130,7 @@ fn insert_line_above(_: &mut Workspace, _: &InsertLineAbove, cx: &mut ViewContex
|
||||||
vim.switch_mode(Mode::Insert, cx);
|
vim.switch_mode(Mode::Insert, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
let (map, old_selections) = editor.display_selections(cx);
|
let (map, old_selections) = editor.selections.all_display(cx);
|
||||||
let selection_start_rows: HashSet<u32> = old_selections
|
let selection_start_rows: HashSet<u32> = old_selections
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|selection| selection.start.row())
|
.map(|selection| selection.start.row())
|
||||||
|
@ -137,10 +145,12 @@ fn insert_line_above(_: &mut Workspace, _: &InsertLineAbove, cx: &mut ViewContex
|
||||||
(start_of_line..start_of_line, new_text)
|
(start_of_line..start_of_line, new_text)
|
||||||
});
|
});
|
||||||
editor.edit_with_autoindent(edits, cx);
|
editor.edit_with_autoindent(edits, cx);
|
||||||
editor.move_cursors(cx, |map, mut cursor, _| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
*cursor.row_mut() -= 1;
|
s.move_cursors_with(|map, mut cursor, _| {
|
||||||
*cursor.column_mut() = map.line_len(cursor.row());
|
*cursor.row_mut() -= 1;
|
||||||
(map.clip_point(cursor, Bias::Left), SelectionGoal::None)
|
*cursor.column_mut() = map.line_len(cursor.row());
|
||||||
|
(map.clip_point(cursor, Bias::Left), SelectionGoal::None)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -152,7 +162,7 @@ fn insert_line_below(_: &mut Workspace, _: &InsertLineBelow, cx: &mut ViewContex
|
||||||
vim.switch_mode(Mode::Insert, cx);
|
vim.switch_mode(Mode::Insert, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
let (map, old_selections) = editor.display_selections(cx);
|
let (map, old_selections) = editor.selections.all_display(cx);
|
||||||
let selection_end_rows: HashSet<u32> = old_selections
|
let selection_end_rows: HashSet<u32> = old_selections
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|selection| selection.end.row())
|
.map(|selection| selection.end.row())
|
||||||
|
@ -166,8 +176,10 @@ fn insert_line_below(_: &mut Workspace, _: &InsertLineBelow, cx: &mut ViewContex
|
||||||
new_text.push_str(&" ".repeat(indent as usize));
|
new_text.push_str(&" ".repeat(indent as usize));
|
||||||
(end_of_line..end_of_line, new_text)
|
(end_of_line..end_of_line, new_text)
|
||||||
});
|
});
|
||||||
editor.move_cursors(cx, |map, cursor, goal| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
Motion::EndOfLine.move_point(map, cursor, goal)
|
s.move_cursors_with(|map, cursor, goal| {
|
||||||
|
Motion::EndOfLine.move_point(map, cursor, goal)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor.edit_with_autoindent(edits, cx);
|
editor.edit_with_autoindent(edits, cx);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::{motion::Motion, state::Mode, Vim};
|
use crate::{motion::Motion, state::Mode, Vim};
|
||||||
use editor::{char_kind, movement};
|
use editor::{char_kind, movement, Autoscroll};
|
||||||
use gpui::{impl_actions, MutableAppContext, ViewContext};
|
use gpui::{impl_actions, MutableAppContext, ViewContext};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
@ -22,8 +22,10 @@ pub fn change_over(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
// We are swapping to insert mode anyway. Just set the line end clipping behavior now
|
// We are swapping to insert mode anyway. Just set the line end clipping behavior now
|
||||||
editor.set_clip_at_line_ends(false, cx);
|
editor.set_clip_at_line_ends(false, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
motion.expand_selection(map, selection, false);
|
s.move_with(|map, selection| {
|
||||||
|
motion.expand_selection(map, selection, false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor.insert(&"", cx);
|
editor.insert(&"", cx);
|
||||||
});
|
});
|
||||||
|
@ -46,16 +48,21 @@ fn change_word(
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
// We are swapping to insert mode anyway. Just set the line end clipping behavior now
|
// We are swapping to insert mode anyway. Just set the line end clipping behavior now
|
||||||
editor.set_clip_at_line_ends(false, cx);
|
editor.set_clip_at_line_ends(false, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
if selection.end.column() == map.line_len(selection.end.row()) {
|
s.move_with(|map, selection| {
|
||||||
return;
|
if selection.end.column() == map.line_len(selection.end.row()) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
selection.end = movement::find_boundary(map, selection.end, |left, right| {
|
selection.end =
|
||||||
let left_kind = char_kind(left).coerce_punctuation(ignore_punctuation);
|
movement::find_boundary(map, selection.end, |left, right| {
|
||||||
let right_kind = char_kind(right).coerce_punctuation(ignore_punctuation);
|
let left_kind =
|
||||||
|
char_kind(left).coerce_punctuation(ignore_punctuation);
|
||||||
|
let right_kind =
|
||||||
|
char_kind(right).coerce_punctuation(ignore_punctuation);
|
||||||
|
|
||||||
left_kind != right_kind || left == '\n' || right == '\n'
|
left_kind != right_kind || left == '\n' || right == '\n'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
editor.insert(&"", cx);
|
editor.insert(&"", cx);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{motion::Motion, Vim};
|
use crate::{motion::Motion, Vim};
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use editor::Bias;
|
use editor::{Autoscroll, Bias};
|
||||||
use gpui::MutableAppContext;
|
use gpui::MutableAppContext;
|
||||||
|
|
||||||
pub fn delete_over(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
pub fn delete_over(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
||||||
|
@ -8,24 +8,28 @@ pub fn delete_over(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
editor.set_clip_at_line_ends(false, cx);
|
editor.set_clip_at_line_ends(false, cx);
|
||||||
let mut original_columns: HashMap<_, _> = Default::default();
|
let mut original_columns: HashMap<_, _> = Default::default();
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
let original_head = selection.head();
|
s.move_with(|map, selection| {
|
||||||
motion.expand_selection(map, selection, true);
|
let original_head = selection.head();
|
||||||
original_columns.insert(selection.id, original_head.column());
|
motion.expand_selection(map, selection, true);
|
||||||
|
original_columns.insert(selection.id, original_head.column());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor.insert(&"", cx);
|
editor.insert(&"", cx);
|
||||||
|
|
||||||
// Fixup cursor position after the deletion
|
// Fixup cursor position after the deletion
|
||||||
editor.set_clip_at_line_ends(true, cx);
|
editor.set_clip_at_line_ends(true, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
let mut cursor = selection.head();
|
s.move_with(|map, selection| {
|
||||||
if motion.linewise() {
|
let mut cursor = selection.head();
|
||||||
if let Some(column) = original_columns.get(&selection.id) {
|
if motion.linewise() {
|
||||||
*cursor.column_mut() = *column
|
if let Some(column) = original_columns.get(&selection.id) {
|
||||||
|
*cursor.column_mut() = *column
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
cursor = map.clip_point(cursor, Bias::Left);
|
||||||
cursor = map.clip_point(cursor, Bias::Left);
|
selection.collapse_to(cursor, selection.goal)
|
||||||
selection.collapse_to(cursor, selection.goal)
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::ops::{Deref, Range};
|
||||||
use collections::BTreeMap;
|
use collections::BTreeMap;
|
||||||
use itertools::{Either, Itertools};
|
use itertools::{Either, Itertools};
|
||||||
|
|
||||||
use editor::display_map::ToDisplayPoint;
|
use editor::{display_map::ToDisplayPoint, Autoscroll};
|
||||||
use gpui::{json::json, keymap::Keystroke, ViewHandle};
|
use gpui::{json::json, keymap::Keystroke, ViewHandle};
|
||||||
use indoc::indoc;
|
use indoc::indoc;
|
||||||
use language::Selection;
|
use language::Selection;
|
||||||
|
@ -128,7 +128,9 @@ impl<'a> VimTestContext<'a> {
|
||||||
let (unmarked_text, markers) = marked_text(&text);
|
let (unmarked_text, markers) = marked_text(&text);
|
||||||
editor.set_text(unmarked_text, cx);
|
editor.set_text(unmarked_text, cx);
|
||||||
let cursor_offset = markers[0];
|
let cursor_offset = markers[0];
|
||||||
editor.replace_selections_with(cx, |map| cursor_offset.to_display_point(map));
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.replace_cursors_with(|map| vec![cursor_offset.to_display_point(map)])
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +199,8 @@ impl<'a> VimTestContext<'a> {
|
||||||
let (empty_selections, reverse_selections, forward_selections) =
|
let (empty_selections, reverse_selections, forward_selections) =
|
||||||
self.editor.read_with(self.cx, |editor, cx| {
|
self.editor.read_with(self.cx, |editor, cx| {
|
||||||
let (empty_selections, non_empty_selections): (Vec<_>, Vec<_>) = editor
|
let (empty_selections, non_empty_selections): (Vec<_>, Vec<_>) = editor
|
||||||
.local_selections::<usize>(cx)
|
.selections
|
||||||
|
.all::<usize>(cx)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.partition_map(|selection| {
|
.partition_map(|selection| {
|
||||||
if selection.is_empty() {
|
if selection.is_empty() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use editor::Bias;
|
use editor::{Autoscroll, Bias};
|
||||||
use gpui::{actions, MutableAppContext, ViewContext};
|
use gpui::{actions, MutableAppContext, ViewContext};
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
||||||
|
@ -14,23 +14,25 @@ pub fn init(cx: &mut MutableAppContext) {
|
||||||
pub fn visual_motion(motion: Motion, cx: &mut MutableAppContext) {
|
pub fn visual_motion(motion: Motion, cx: &mut MutableAppContext) {
|
||||||
Vim::update(cx, |vim, cx| {
|
Vim::update(cx, |vim, cx| {
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
let (new_head, goal) = motion.move_point(map, selection.head(), selection.goal);
|
s.move_with(|map, selection| {
|
||||||
let new_head = map.clip_at_line_end(new_head);
|
let (new_head, goal) = motion.move_point(map, selection.head(), selection.goal);
|
||||||
let was_reversed = selection.reversed;
|
let new_head = map.clip_at_line_end(new_head);
|
||||||
selection.set_head(new_head, goal);
|
let was_reversed = selection.reversed;
|
||||||
|
selection.set_head(new_head, goal);
|
||||||
|
|
||||||
if was_reversed && !selection.reversed {
|
if was_reversed && !selection.reversed {
|
||||||
// Head was at the start of the selection, and now is at the end. We need to move the start
|
// Head was at the start of the selection, and now is at the end. We need to move the start
|
||||||
// back by one if possible in order to compensate for this change.
|
// back by one if possible in order to compensate for this change.
|
||||||
*selection.start.column_mut() = selection.start.column().saturating_sub(1);
|
*selection.start.column_mut() = selection.start.column().saturating_sub(1);
|
||||||
selection.start = map.clip_point(selection.start, Bias::Left);
|
selection.start = map.clip_point(selection.start, Bias::Left);
|
||||||
} else if !was_reversed && selection.reversed {
|
} else if !was_reversed && selection.reversed {
|
||||||
// Head was at the end of the selection, and now is at the start. We need to move the end
|
// Head was at the end of the selection, and now is at the start. We need to move the end
|
||||||
// forward by one if possible in order to compensate for this change.
|
// forward by one if possible in order to compensate for this change.
|
||||||
*selection.end.column_mut() = selection.end.column() + 1;
|
*selection.end.column_mut() = selection.end.column() + 1;
|
||||||
selection.end = map.clip_point(selection.end, Bias::Left);
|
selection.end = map.clip_point(selection.end, Bias::Left);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -40,13 +42,15 @@ pub fn change(_: &mut Workspace, _: &VisualChange, cx: &mut ViewContext<Workspac
|
||||||
Vim::update(cx, |vim, cx| {
|
Vim::update(cx, |vim, cx| {
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.set_clip_at_line_ends(false, cx);
|
editor.set_clip_at_line_ends(false, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
if !selection.reversed {
|
s.move_with(|map, selection| {
|
||||||
// Head was at the end of the selection, and now is at the start. We need to move the end
|
if !selection.reversed {
|
||||||
// forward by one if possible in order to compensate for this change.
|
// Head was at the end of the selection, and now is at the start. We need to move the end
|
||||||
*selection.end.column_mut() = selection.end.column() + 1;
|
// forward by one if possible in order to compensate for this change.
|
||||||
selection.end = map.clip_point(selection.end, Bias::Left);
|
*selection.end.column_mut() = selection.end.column() + 1;
|
||||||
}
|
selection.end = map.clip_point(selection.end, Bias::Left);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor.insert("", cx);
|
editor.insert("", cx);
|
||||||
});
|
});
|
||||||
|
@ -59,22 +63,26 @@ pub fn delete(_: &mut Workspace, _: &VisualDelete, cx: &mut ViewContext<Workspac
|
||||||
vim.switch_mode(Mode::Normal, cx);
|
vim.switch_mode(Mode::Normal, cx);
|
||||||
vim.update_active_editor(cx, |editor, cx| {
|
vim.update_active_editor(cx, |editor, cx| {
|
||||||
editor.set_clip_at_line_ends(false, cx);
|
editor.set_clip_at_line_ends(false, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
if !selection.reversed {
|
s.move_with(|map, selection| {
|
||||||
// Head was at the end of the selection, and now is at the start. We need to move the end
|
if !selection.reversed {
|
||||||
// forward by one if possible in order to compensate for this change.
|
// Head was at the end of the selection, and now is at the start. We need to move the end
|
||||||
*selection.end.column_mut() = selection.end.column() + 1;
|
// forward by one if possible in order to compensate for this change.
|
||||||
selection.end = map.clip_point(selection.end, Bias::Left);
|
*selection.end.column_mut() = selection.end.column() + 1;
|
||||||
}
|
selection.end = map.clip_point(selection.end, Bias::Left);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor.insert("", cx);
|
editor.insert("", cx);
|
||||||
|
|
||||||
// Fixup cursor position after the deletion
|
// Fixup cursor position after the deletion
|
||||||
editor.set_clip_at_line_ends(true, cx);
|
editor.set_clip_at_line_ends(true, cx);
|
||||||
editor.move_selections(cx, |map, selection| {
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
let mut cursor = selection.head();
|
s.move_with(|map, selection| {
|
||||||
cursor = map.clip_point(cursor, Bias::Left);
|
let mut cursor = selection.head();
|
||||||
selection.collapse_to(cursor, selection.goal)
|
cursor = map.clip_point(cursor, Bias::Left);
|
||||||
|
selection.collapse_to(cursor, selection.goal)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,7 @@ authors = ["Nathan Sobo <nathansobo@gmail.com>"]
|
||||||
description = "The fast, collaborative code editor."
|
description = "The fast, collaborative code editor."
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
name = "zed"
|
name = "zed"
|
||||||
version = "0.32.0"
|
version = "0.33.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "zed"
|
name = "zed"
|
||||||
|
|
|
@ -311,7 +311,7 @@ fn open_config_file(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use assets::Assets;
|
use assets::Assets;
|
||||||
use editor::{DisplayPoint, Editor};
|
use editor::{Autoscroll, DisplayPoint, Editor};
|
||||||
use gpui::{AssetSource, MutableAppContext, TestAppContext, ViewHandle};
|
use gpui::{AssetSource, MutableAppContext, TestAppContext, ViewHandle};
|
||||||
use project::{Fs, ProjectPath};
|
use project::{Fs, ProjectPath};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
@ -964,7 +964,9 @@ mod tests {
|
||||||
.downcast::<Editor>()
|
.downcast::<Editor>()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(10, 0)..DisplayPoint::new(10, 0)], cx);
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(10, 0)..DisplayPoint::new(10, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
let editor2 = workspace
|
let editor2 = workspace
|
||||||
.update(cx, |w, cx| w.open_path(file2.clone(), true, cx))
|
.update(cx, |w, cx| w.open_path(file2.clone(), true, cx))
|
||||||
|
@ -981,10 +983,9 @@ mod tests {
|
||||||
|
|
||||||
editor3
|
editor3
|
||||||
.update(cx, |editor, cx| {
|
.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(
|
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
|
||||||
&[DisplayPoint::new(12, 0)..DisplayPoint::new(12, 0)],
|
s.select_display_ranges([DisplayPoint::new(12, 0)..DisplayPoint::new(12, 0)])
|
||||||
cx,
|
});
|
||||||
);
|
|
||||||
editor.newline(&Default::default(), cx);
|
editor.newline(&Default::default(), cx);
|
||||||
editor.newline(&Default::default(), cx);
|
editor.newline(&Default::default(), cx);
|
||||||
editor.move_down(&Default::default(), cx);
|
editor.move_down(&Default::default(), cx);
|
||||||
|
@ -1125,34 +1126,37 @@ mod tests {
|
||||||
// Modify file to collapse multiple nav history entries into the same location.
|
// Modify file to collapse multiple nav history entries into the same location.
|
||||||
// Ensure we don't visit the same location twice when navigating.
|
// Ensure we don't visit the same location twice when navigating.
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(15, 0)..DisplayPoint::new(15, 0)], cx)
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(15, 0)..DisplayPoint::new(15, 0)])
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
for _ in 0..5 {
|
for _ in 0..5 {
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor
|
editor.change_selections(None, cx, |s| {
|
||||||
.select_display_ranges(&[DisplayPoint::new(3, 0)..DisplayPoint::new(3, 0)], cx);
|
s.select_display_ranges([DisplayPoint::new(3, 0)..DisplayPoint::new(3, 0)])
|
||||||
|
});
|
||||||
});
|
});
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(
|
editor.change_selections(None, cx, |s| {
|
||||||
&[DisplayPoint::new(13, 0)..DisplayPoint::new(13, 0)],
|
s.select_display_ranges([DisplayPoint::new(13, 0)..DisplayPoint::new(13, 0)])
|
||||||
cx,
|
})
|
||||||
)
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor.transact(cx, |editor, cx| {
|
editor.transact(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(
|
editor.change_selections(None, cx, |s| {
|
||||||
&[DisplayPoint::new(2, 0)..DisplayPoint::new(14, 0)],
|
s.select_display_ranges([DisplayPoint::new(2, 0)..DisplayPoint::new(14, 0)])
|
||||||
cx,
|
});
|
||||||
);
|
|
||||||
editor.insert("", cx);
|
editor.insert("", cx);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
editor1.update(cx, |editor, cx| {
|
editor1.update(cx, |editor, cx| {
|
||||||
editor.select_display_ranges(&[DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)], cx)
|
editor.change_selections(None, cx, |s| {
|
||||||
|
s.select_display_ranges([DisplayPoint::new(1, 0)..DisplayPoint::new(1, 0)])
|
||||||
|
})
|
||||||
});
|
});
|
||||||
workspace
|
workspace
|
||||||
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
.update(cx, |w, cx| Pane::go_back(w, None, cx))
|
||||||
|
@ -1178,7 +1182,7 @@ mod tests {
|
||||||
let editor = item.downcast::<Editor>().unwrap();
|
let editor = item.downcast::<Editor>().unwrap();
|
||||||
let (selections, scroll_position) = editor.update(cx, |editor, cx| {
|
let (selections, scroll_position) = editor.update(cx, |editor, cx| {
|
||||||
(
|
(
|
||||||
editor.selected_display_ranges(cx),
|
editor.selections.display_ranges(cx),
|
||||||
editor.scroll_position(cx),
|
editor.scroll_position(cx),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
405
styles/dist/dark.json
vendored
405
styles/dist/dark.json
vendored
|
@ -1,698 +1,531 @@
|
||||||
{
|
{
|
||||||
"meta": {
|
"meta": {
|
||||||
"themeName": "dark"
|
"themeName": "cave-dark"
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#f1f1f1",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 50",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#9c9c9c",
|
"value": "#8b8792",
|
||||||
"description": "Step: 350",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#808080",
|
"value": "#8b8792",
|
||||||
"description": "Step: 450",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"value": "#474747",
|
"value": "#7e7887",
|
||||||
"description": "Step: 650",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff",
|
"value": "#efecf4",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"feature": {
|
"feature": {
|
||||||
"value": "#4f8ff7",
|
"value": "#576ddb",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#1b9447",
|
"value": "#2a9292",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#f15656",
|
"value": "#be4678",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#f7bb57",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#c6c6c6",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 200",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#9c9c9c",
|
"value": "#8b8792",
|
||||||
"description": "Step: 350",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#555555",
|
"value": "#8b8792",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"value": "#393939",
|
"value": "#7e7887",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff",
|
"value": "#efecf4",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"feature": {
|
"feature": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#1b9447",
|
"value": "#2a9292",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#eb2d2d",
|
"value": "#be4678",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#f6a724",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#135acd",
|
"value": "#576ddb",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": {
|
"background": {
|
||||||
"100": {
|
"100": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#2b2b2b",
|
"value": "#26232a",
|
||||||
"description": "Step: 750",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#323232",
|
"value": "#5852603d",
|
||||||
"description": "Step: 725",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#1c1c1c",
|
"value": "#5852605c",
|
||||||
"description": "Step: 800",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#404040",
|
|
||||||
"description": "Step: 675",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"300": {
|
"300": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#1c1c1c",
|
"value": "#26232a",
|
||||||
"description": "Step: 800",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#232323",
|
"value": "#5852603d",
|
||||||
"description": "Step: 775",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#2b2b2b",
|
"value": "#5852605c",
|
||||||
"description": "Step: 750",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#232323",
|
|
||||||
"description": "Step: 775",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#000000",
|
"value": "#19171c",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#ffffff14",
|
"value": "#26232a3d",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff1f",
|
"value": "#26232a5c",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#151515",
|
|
||||||
"description": "Step: 825",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on300": {
|
"on300": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#0e0e0e80",
|
"value": "#19171c",
|
||||||
"description": "Step: 850",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#070707",
|
"value": "#26232a3d",
|
||||||
"description": "Step: 875",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#000000",
|
"value": "#26232a7a",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#070707",
|
|
||||||
"description": "Step: 875",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on500": {
|
"on500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#0e0e0e",
|
"value": "#26232a",
|
||||||
"description": "Step: 850",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#1c1c1c",
|
"value": "#5852603d",
|
||||||
"description": "Step: 800",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#232323",
|
"value": "#5852607a",
|
||||||
"description": "Step: 775",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#1c1c1c",
|
|
||||||
"description": "Step: 800",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#1b944726",
|
"value": "#2a929226",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#1b944733",
|
"value": "#2a929233",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#1b944740",
|
"value": "#2a929240",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#1b944733",
|
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#c9181826",
|
"value": "#be467826",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#c9181833",
|
"value": "#be467833",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#c9181840",
|
"value": "#be467840",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#c9181833",
|
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#f6a72426",
|
"value": "#a06e3b26",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#f6a72433",
|
"value": "#a06e3b33",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#f6a72440",
|
"value": "#a06e3b40",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#f6a72433",
|
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#2472f226",
|
"value": "#576ddb26",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#2472f233",
|
"value": "#576ddb33",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#2472f240",
|
"value": "#576ddb40",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#2472f233",
|
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#070707",
|
"value": "#19171c",
|
||||||
"description": "Step: 875",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#232323",
|
"value": "#26232a",
|
||||||
"description": "Step: 775",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#404040",
|
"value": "#655f6d",
|
||||||
"description": "Step: 675",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#484bed",
|
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#000000",
|
"value": "#655f6d",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"onMedia": {
|
"onMedia": {
|
||||||
"value": "#0707071a",
|
"value": "#19171c1a",
|
||||||
"description": "Step: 875",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#1b944726",
|
"value": "#2a929226",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#eb2d2d26",
|
"value": "#be467826",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#f6a72426",
|
"value": "#a06e3b26",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#2472f226",
|
"value": "#576ddb26",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"background": {
|
"background": {
|
||||||
"value": "#000000",
|
"value": "#19171c",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide": {
|
"indent_guide": {
|
||||||
"value": "#404040",
|
"value": "#655f6d",
|
||||||
"description": "Step: 675",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide_active": {
|
"indent_guide_active": {
|
||||||
"value": "#232323",
|
"value": "#26232a",
|
||||||
"description": "Step: 775",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"line": {
|
"line": {
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff12",
|
"value": "#efecf412",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"highlighted": {
|
"highlighted": {
|
||||||
"value": "#ffffff1f",
|
"value": "#efecf41f",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"inserted": {
|
"inserted": {
|
||||||
"value": "#1b944740",
|
"value": "#2a929240",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"deleted": {
|
"deleted": {
|
||||||
"value": "#c9181840",
|
"value": "#be467840",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"modified": {
|
"modified": {
|
||||||
"value": "#2472f240",
|
"value": "#576ddb40",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"highlight": {
|
"highlight": {
|
||||||
"selection": {
|
"selection": {
|
||||||
"value": "#2472f23d",
|
"value": "#576ddb3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"occurrence": {
|
"occurrence": {
|
||||||
"value": "#ffffff1f",
|
"value": "#efecf41f",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeOccurrence": {
|
"activeOccurrence": {
|
||||||
"value": "#ffffff29",
|
"value": "#efecf43d",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"matchingBracket": {
|
"matchingBracket": {
|
||||||
"value": "#ffffff1f",
|
"value": "#26232a5c",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"match": {
|
"match": {
|
||||||
"value": "#3f15a380",
|
"value": "#955ae77a",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeMatch": {
|
"activeMatch": {
|
||||||
"value": "#5316e0b3",
|
"value": "#955ae7b8",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"related": {
|
"related": {
|
||||||
"value": "#151515",
|
"value": "#26232a3d",
|
||||||
"description": "Step: 825",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gutter": {
|
"gutter": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#474747",
|
"value": "#7e7887",
|
||||||
"description": "Step: 650",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff",
|
"value": "#efecf4",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syntax": {
|
"syntax": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#d5d5d5",
|
"value": "#efecf4",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"value": "#aaaaaa",
|
"value": "#8b8792",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"keyword": {
|
"keyword": {
|
||||||
"value": "#4f8ff7",
|
"value": "#576ddb",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"function": {
|
"function": {
|
||||||
"value": "#f9da82",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 200",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"value": "#3eeeda",
|
"value": "#398bc6",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"variant": {
|
"variant": {
|
||||||
"value": "#53c1f5",
|
"value": "#576ddb",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"value": "#4f8ff7",
|
"value": "#576ddb",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"enum": {
|
"enum": {
|
||||||
"value": "#ee670a",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"operator": {
|
"operator": {
|
||||||
"value": "#ee670a",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"string": {
|
"string": {
|
||||||
"value": "#f99d5f",
|
"value": "#aa573c",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"number": {
|
"number": {
|
||||||
"value": "#aeef4b",
|
"value": "#2a9292",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"boolean": {
|
"boolean": {
|
||||||
"value": "#aeef4b",
|
"value": "#2a9292",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"1": {
|
"1": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#2472f23d",
|
"value": "#576ddb3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#2472f2cc",
|
"value": "#576ddbcc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#79ba16",
|
"value": "#2a9292",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#79ba16",
|
"value": "#2a9292",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#79ba163d",
|
"value": "#2a92923d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#79ba16cc",
|
"value": "#2a9292cc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#d430e0",
|
"value": "#bf40bf",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#d430e0",
|
"value": "#bf40bf",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#d430e03d",
|
"value": "#bf40bf3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#d430e0cc",
|
"value": "#bf40bfcc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"4": {
|
"4": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#ee670a",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#ee670a",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#ee670a3d",
|
"value": "#aa573c3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#ee670acc",
|
"value": "#aa573ccc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#993bf3",
|
"value": "#955ae7",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#993bf3",
|
"value": "#955ae7",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#993bf33d",
|
"value": "#955ae73d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#993bf3cc",
|
"value": "#955ae7cc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"6": {
|
"6": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#16d6c1",
|
"value": "#398bc6",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#16d6c1",
|
"value": "#398bc6",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#16d6c13d",
|
"value": "#398bc63d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#16d6c1cc",
|
"value": "#398bc6cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#ef59a3",
|
"value": "#be4678",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#ef59a3",
|
"value": "#be4678",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#ef59a33d",
|
"value": "#be46783d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#ef59a3cc",
|
"value": "#be4678cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#f7bf17",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#f7bf17",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#f7bf173d",
|
"value": "#a06e3b3d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#f7bf17cc",
|
"value": "#a06e3bcc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"shadowAlpha": {
|
"shadowAlpha": {
|
||||||
"value": 0.32,
|
"value": 0.24,
|
||||||
"type": "number"
|
"type": "number"
|
||||||
}
|
}
|
||||||
}
|
}
|
403
styles/dist/light.json
vendored
403
styles/dist/light.json
vendored
|
@ -1,692 +1,525 @@
|
||||||
{
|
{
|
||||||
"meta": {
|
"meta": {
|
||||||
"themeName": "light"
|
"themeName": "cave-light"
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#2b2b2b",
|
"value": "#26232a",
|
||||||
"description": "Step: 750",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#474747",
|
"value": "#585260",
|
||||||
"description": "Step: 650",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#636363",
|
"value": "#585260",
|
||||||
"description": "Step: 550",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"value": "#808080",
|
"value": "#655f6d",
|
||||||
"description": "Step: 450",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#000000",
|
"value": "#19171c",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"feature": {
|
"feature": {
|
||||||
"value": "#484bed",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#20b456",
|
"value": "#2a9292",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#eb2d2d",
|
"value": "#be4678",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#d3a20b",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#393939",
|
"value": "#26232a",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#717171",
|
"value": "#585260",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#9c9c9c",
|
"value": "#585260",
|
||||||
"description": "Step: 350",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"value": "#aaaaaa",
|
"value": "#655f6d",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#000000",
|
"value": "#19171c",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"feature": {
|
"feature": {
|
||||||
"value": "#484bed",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#1b9447",
|
"value": "#2a9292",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#c91818",
|
"value": "#be4678",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#f7bf17",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#135acd",
|
"value": "#576ddb",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": {
|
"background": {
|
||||||
"100": {
|
"100": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#eaeaea",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 75",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#e3e3e3",
|
"value": "#8b87921f",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#d5d5d5",
|
"value": "#8b87922e",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#e3e3e3",
|
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"300": {
|
"300": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#f8f8f8",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 25",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#eaeaea",
|
"value": "#8b87921f",
|
||||||
"description": "Step: 75",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#e3e3e3",
|
"value": "#8b87922e",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#eaeaea",
|
|
||||||
"description": "Step: 75",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#ffffff",
|
"value": "#efecf4",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#00000008",
|
"value": "#e2dfe71f",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#0000000f",
|
"value": "#e2dfe72e",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#f1f1f1",
|
|
||||||
"description": "Step: 50",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on300": {
|
"on300": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#f1f1f1",
|
"value": "#efecf4",
|
||||||
"description": "Step: 50",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#e3e3e3",
|
"value": "#e2dfe71f",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#d5d5d5",
|
"value": "#e2dfe73d",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#e3e3e3",
|
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on500": {
|
"on500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#f1f1f1",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 50",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#f8f8f8",
|
"value": "#8b87921f",
|
||||||
"description": "Step: 25",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#ffffff",
|
"value": "#8b87923d",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#f8f8f8",
|
|
||||||
"description": "Step: 25",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#1b944726",
|
"value": "#2a929226",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#1b944733",
|
"value": "#2a929233",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#1b944740",
|
"value": "#2a929240",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#1b944733",
|
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#c9181826",
|
"value": "#be467826",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#c9181833",
|
"value": "#be467833",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#c9181840",
|
"value": "#be467840",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#c9181833",
|
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#f6a72426",
|
"value": "#a06e3b26",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#f6a72433",
|
"value": "#a06e3b33",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#f6a72440",
|
"value": "#a06e3b40",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#f6a72433",
|
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#2472f226",
|
"value": "#576ddb26",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#2472f233",
|
"value": "#576ddb33",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#2472f240",
|
"value": "#576ddb40",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#2472f233",
|
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#d5d5d5",
|
"value": "#efecf4",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#d5d5d5",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#e3e3e3",
|
"value": "#7e7887",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#484bed",
|
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#b8b8b8",
|
"value": "#7e7887",
|
||||||
"description": "Step: 250",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"onMedia": {
|
"onMedia": {
|
||||||
"value": "#b8b8b84d",
|
"value": "#efecf41a",
|
||||||
"description": "Step: 250",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"ok": {
|
"ok": {
|
||||||
"value": "#1b944726",
|
"value": "#2a929226",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"value": "#eb2d2d26",
|
"value": "#be467826",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
"value": "#f6a72426",
|
"value": "#a06e3b26",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"value": "#2472f226",
|
"value": "#576ddb26",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"background": {
|
"background": {
|
||||||
"value": "#ffffff",
|
"value": "#efecf4",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide": {
|
"indent_guide": {
|
||||||
"value": "#e3e3e3",
|
"value": "#7e7887",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide_active": {
|
"indent_guide_active": {
|
||||||
"value": "#d5d5d5",
|
"value": "#e2dfe7",
|
||||||
"description": "Step: 150",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"line": {
|
"line": {
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#0000000f",
|
"value": "#19171c12",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"highlighted": {
|
"highlighted": {
|
||||||
"value": "#0000001f",
|
"value": "#19171c1f",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"inserted": {
|
"inserted": {
|
||||||
"value": "#1b944740",
|
"value": "#2a929240",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"deleted": {
|
"deleted": {
|
||||||
"value": "#c9181840",
|
"value": "#be467840",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"modified": {
|
"modified": {
|
||||||
"value": "#2472f240",
|
"value": "#576ddb40",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"highlight": {
|
"highlight": {
|
||||||
"selection": {
|
"selection": {
|
||||||
"value": "#2472f23d",
|
"value": "#576ddb3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"occurrence": {
|
"occurrence": {
|
||||||
"value": "#0000000f",
|
"value": "#19171c0f",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeOccurrence": {
|
"activeOccurrence": {
|
||||||
"value": "#00000029",
|
"value": "#19171c1f",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"matchingBracket": {
|
"matchingBracket": {
|
||||||
"value": "#ffffff",
|
"value": "#e2dfe72e",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"match": {
|
"match": {
|
||||||
"value": "#fce9b7",
|
"value": "#955ae73d",
|
||||||
"description": "Step: 100",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeMatch": {
|
"activeMatch": {
|
||||||
"value": "#f9da82",
|
"value": "#955ae75c",
|
||||||
"description": "Step: 200",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"related": {
|
"related": {
|
||||||
"value": "#ffffff",
|
"value": "#e2dfe71f",
|
||||||
"description": "Step: 0",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gutter": {
|
"gutter": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#aaaaaa",
|
"value": "#655f6d",
|
||||||
"description": "Step: 300",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#000000",
|
"value": "#19171c",
|
||||||
"description": "Step: 900",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syntax": {
|
"syntax": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#1c1c1c",
|
"value": "#19171c",
|
||||||
"description": "Step: 800",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"value": "#717171",
|
"value": "#585260",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"keyword": {
|
"keyword": {
|
||||||
"value": "#1819a1",
|
"value": "#576ddb",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"function": {
|
"function": {
|
||||||
"value": "#bb550e",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"value": "#a8820e",
|
"value": "#398bc6",
|
||||||
"description": "Step: 600",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"variant": {
|
"variant": {
|
||||||
"value": "#97142a",
|
"value": "#576ddb",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"value": "#106c4e",
|
"value": "#576ddb",
|
||||||
"description": "Step: 700",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"enum": {
|
"enum": {
|
||||||
"value": "#eb2d2d",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"operator": {
|
"operator": {
|
||||||
"value": "#eb2d2d",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"string": {
|
"string": {
|
||||||
"value": "#eb2d2d",
|
"value": "#aa573c",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"number": {
|
"number": {
|
||||||
"value": "#484bed",
|
"value": "#2a9292",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"boolean": {
|
"boolean": {
|
||||||
"value": "#eb2d2d",
|
"value": "#2a9292",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"1": {
|
"1": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#2472f2",
|
"value": "#576ddb",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#2472f23d",
|
"value": "#576ddb3d",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#2472f2cc",
|
"value": "#576ddbcc",
|
||||||
"description": "Step: 500",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#12d796",
|
"value": "#2a9292",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#12d796",
|
"value": "#2a9292",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#12d7963d",
|
"value": "#2a92923d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#12d796cc",
|
"value": "#2a9292cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#de57e8",
|
"value": "#bf40bf",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#de57e8",
|
"value": "#bf40bf",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#de57e83d",
|
"value": "#bf40bf3d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#de57e8cc",
|
"value": "#bf40bfcc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"4": {
|
"4": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#f9812e",
|
"value": "#aa573c",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#f9812e",
|
"value": "#aa573c",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#f9812e3d",
|
"value": "#aa573c3d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#f9812ecc",
|
"value": "#aa573ccc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#b066f8",
|
"value": "#955ae7",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#b066f8",
|
"value": "#955ae7",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#b066f83d",
|
"value": "#955ae73d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#b066f8cc",
|
"value": "#955ae7cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"6": {
|
"6": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#16d6c1",
|
"value": "#398bc6",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#16d6c1",
|
"value": "#398bc6",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#16d6c13d",
|
"value": "#398bc63d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#16d6c1cc",
|
"value": "#398bc6cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#ef59a3",
|
"value": "#be4678",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#ef59a3",
|
"value": "#be4678",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#ef59a33d",
|
"value": "#be46783d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#ef59a3cc",
|
"value": "#be4678cc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"baseColor": {
|
"baseColor": {
|
||||||
"value": "#f7bf17",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"cursorColor": {
|
"cursorColor": {
|
||||||
"value": "#f7bf17",
|
"value": "#a06e3b",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"selectionColor": {
|
"selectionColor": {
|
||||||
"value": "#f7bf173d",
|
"value": "#a06e3b3d",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"borderColor": {
|
"borderColor": {
|
||||||
"value": "#f7bf17cc",
|
"value": "#a06e3bcc",
|
||||||
"description": "Step: 400",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
92
styles/dist/solarized-dark.json
vendored
92
styles/dist/solarized-dark.json
vendored
|
@ -89,19 +89,15 @@
|
||||||
"background": {
|
"background": {
|
||||||
"100": {
|
"100": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#073642",
|
"value": "#1b444f",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#586e753d",
|
"value": "#30525c",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#586e755c",
|
"value": "#446068",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#586e753d",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -111,15 +107,11 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#586e753d",
|
"value": "#1b444f",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#586e755c",
|
"value": "#30525c",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#586e753d",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -129,15 +121,11 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#0736423d",
|
"value": "#022e39",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#0736425c",
|
"value": "#04313c",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#0736423d",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -147,33 +135,25 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#0736423d",
|
"value": "#022e39",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#0736427a",
|
"value": "#04313c",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#0736423d",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on500": {
|
"on500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#073642",
|
"value": "#1b444f",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#586e753d",
|
"value": "#30525c",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#586e757a",
|
"value": "#446068",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#586e753d",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -189,10 +169,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#85990040",
|
"value": "#85990040",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#85990033",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
@ -207,10 +183,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#dc322f40",
|
"value": "#dc322f40",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#dc322f33",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
|
@ -225,10 +197,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#b5890040",
|
"value": "#b5890040",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#b5890033",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
|
@ -243,10 +211,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#268bd240",
|
"value": "#268bd240",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#268bd233",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -263,10 +227,6 @@
|
||||||
"value": "#657b83",
|
"value": "#657b83",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"focused": {
|
|
||||||
"value": "#657b83",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#657b83",
|
"value": "#657b83",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
|
@ -307,23 +267,11 @@
|
||||||
},
|
},
|
||||||
"line": {
|
"line": {
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#fdf6e312",
|
"value": "#073642",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"highlighted": {
|
"highlighted": {
|
||||||
"value": "#fdf6e31f",
|
"value": "#1b444f",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"inserted": {
|
|
||||||
"value": "#85990040",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"deleted": {
|
|
||||||
"value": "#dc322f40",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"modified": {
|
|
||||||
"value": "#268bd240",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -333,27 +281,27 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"occurrence": {
|
"occurrence": {
|
||||||
"value": "#fdf6e31f",
|
"value": "#586e753d",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeOccurrence": {
|
"activeOccurrence": {
|
||||||
"value": "#fdf6e33d",
|
"value": "#586e757a",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"matchingBracket": {
|
"matchingBracket": {
|
||||||
"value": "#0736425c",
|
"value": "#04313c",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"match": {
|
"match": {
|
||||||
"value": "#6c71c47a",
|
"value": "#1b1f6b",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeMatch": {
|
"activeMatch": {
|
||||||
"value": "#6c71c4b8",
|
"value": "#434abc7a",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"related": {
|
"related": {
|
||||||
"value": "#0736423d",
|
"value": "#022e39",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
104
styles/dist/solarized-light.json
vendored
104
styles/dist/solarized-light.json
vendored
|
@ -89,19 +89,15 @@
|
||||||
"background": {
|
"background": {
|
||||||
"100": {
|
"100": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#eee8d5",
|
"value": "#d7d6c8",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#93a1a11f",
|
"value": "#c1c5bb",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#93a1a12e",
|
"value": "#aab3ae",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#93a1a11f",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -111,15 +107,11 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#93a1a11f",
|
"value": "#d7d6c8",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#93a1a12e",
|
"value": "#c1c5bb",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#93a1a11f",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -129,15 +121,11 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#eee8d51f",
|
"value": "#f9f3e0",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#eee8d52e",
|
"value": "#f6efdc",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#eee8d51f",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -147,33 +135,25 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#eee8d51f",
|
"value": "#f9f3e0",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#eee8d53d",
|
"value": "#f6efdc",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#eee8d51f",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on500": {
|
"on500": {
|
||||||
"base": {
|
"base": {
|
||||||
"value": "#eee8d5",
|
"value": "#d7d6c8",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"hovered": {
|
"hovered": {
|
||||||
"value": "#93a1a11f",
|
"value": "#c1c5bb",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#93a1a13d",
|
"value": "#aab3ae",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#93a1a11f",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -189,10 +169,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#85990040",
|
"value": "#85990040",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#85990033",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
@ -207,10 +183,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#dc322f40",
|
"value": "#dc322f40",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#dc322f33",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
|
@ -225,10 +197,6 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#b5890040",
|
"value": "#b5890040",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#b5890033",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
|
@ -243,32 +211,24 @@
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#268bd240",
|
"value": "#268bd240",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#268bd233",
|
|
||||||
"type": "color"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"value": "#fdf6e3",
|
"value": "#93a1a1",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"secondary": {
|
"secondary": {
|
||||||
"value": "#eee8d5",
|
"value": "#93a1a1",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"muted": {
|
"muted": {
|
||||||
"value": "#839496",
|
"value": "#657b83",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"focused": {
|
|
||||||
"value": "#839496",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#839496",
|
"value": "#657b83",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"onMedia": {
|
"onMedia": {
|
||||||
|
@ -298,32 +258,20 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide": {
|
"indent_guide": {
|
||||||
"value": "#839496",
|
"value": "#657b83",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"indent_guide_active": {
|
"indent_guide_active": {
|
||||||
"value": "#eee8d5",
|
"value": "#93a1a1",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"line": {
|
"line": {
|
||||||
"active": {
|
"active": {
|
||||||
"value": "#002b3612",
|
"value": "#eee8d5",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"highlighted": {
|
"highlighted": {
|
||||||
"value": "#002b361f",
|
"value": "#d7d6c8",
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"inserted": {
|
|
||||||
"value": "#85990040",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"deleted": {
|
|
||||||
"value": "#dc322f40",
|
|
||||||
"type": "color"
|
|
||||||
},
|
|
||||||
"modified": {
|
|
||||||
"value": "#268bd240",
|
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -333,27 +281,27 @@
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"occurrence": {
|
"occurrence": {
|
||||||
"value": "#002b360f",
|
"value": "#93a1a11f",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeOccurrence": {
|
"activeOccurrence": {
|
||||||
"value": "#002b361f",
|
"value": "#93a1a13d",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"matchingBracket": {
|
"matchingBracket": {
|
||||||
"value": "#eee8d52e",
|
"value": "#f6efdc",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"match": {
|
"match": {
|
||||||
"value": "#6c71c43d",
|
"value": "#bcc0f6",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"activeMatch": {
|
"activeMatch": {
|
||||||
"value": "#6c71c45c",
|
"value": "#7f84d73d",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
},
|
},
|
||||||
"related": {
|
"related": {
|
||||||
"value": "#eee8d51f",
|
"value": "#f9f3e0",
|
||||||
"type": "color"
|
"type": "color"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
1020
styles/dist/tokens.json
vendored
1020
styles/dist/tokens.json
vendored
File diff suppressed because it is too large
Load diff
|
@ -2,19 +2,24 @@ import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import app from "./styleTree/app";
|
import app from "./styleTree/app";
|
||||||
import { dark as caveDark, light as caveLight } from "./themes/cave";
|
import { dark as caveDark, light as caveLight } from "./themes/cave";
|
||||||
import dark from "./themes/dark";
|
|
||||||
import light from "./themes/light";
|
|
||||||
import { dark as solarizedDark, light as solarizedLight } from "./themes/solarized";
|
import { dark as solarizedDark, light as solarizedLight } from "./themes/solarized";
|
||||||
import { dark as sulphurpoolDark, light as sulphurpoolLight } from "./themes/sulphurpool";
|
import { dark as sulphurpoolDark, light as sulphurpoolLight } from "./themes/sulphurpool";
|
||||||
import snakeCase from "./utils/snakeCase";
|
import snakeCase from "./utils/snakeCase";
|
||||||
|
|
||||||
const themes = [
|
const themes = [
|
||||||
dark, light,
|
|
||||||
caveDark, caveLight,
|
caveDark, caveLight,
|
||||||
solarizedDark, solarizedLight,
|
solarizedDark, solarizedLight,
|
||||||
sulphurpoolDark, sulphurpoolLight
|
sulphurpoolDark, sulphurpoolLight
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const themeDirectory = `${__dirname}/../../assets/themes/`;
|
||||||
|
|
||||||
|
// Clear existing themes
|
||||||
|
for (const file of fs.readdirSync(themeDirectory)) {
|
||||||
|
fs.unlinkSync(path.join(themeDirectory, file));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write new themes to theme directory
|
||||||
for (let theme of themes) {
|
for (let theme of themes) {
|
||||||
let styleTree = snakeCase(app(theme));
|
let styleTree = snakeCase(app(theme));
|
||||||
let styleTreeJSON = JSON.stringify(styleTree, null, 2);
|
let styleTreeJSON = JSON.stringify(styleTree, null, 2);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import dark from "./themes/dark";
|
|
||||||
import light from "./themes/light";
|
|
||||||
import { light as solarizedLight, dark as solarizedDark } from "./themes/solarized";
|
import { light as solarizedLight, dark as solarizedDark } from "./themes/solarized";
|
||||||
|
// Use cave as "light" and "dark" themes
|
||||||
|
import { light, dark } from "./themes/cave";
|
||||||
import Theme from "./themes/theme";
|
import Theme from "./themes/theme";
|
||||||
import { colors, fontFamilies, fontSizes, fontWeights, sizes } from "./tokens";
|
import { colors, fontFamilies, fontSizes, fontWeights, sizes } from "./tokens";
|
||||||
|
|
||||||
|
|
|
@ -1,116 +1,123 @@
|
||||||
import { ColorToken, fontWeights, NumberToken } from "../tokens";
|
import chroma from "chroma-js";
|
||||||
|
import { Scale, Color } from "chroma-js";
|
||||||
|
import { color, ColorToken, fontWeights, NumberToken } from "../tokens";
|
||||||
import { withOpacity } from "../utils/color";
|
import { withOpacity } from "../utils/color";
|
||||||
import Theme, { buildPlayer, Syntax } from "./theme";
|
import Theme, { buildPlayer, Syntax } from "./theme";
|
||||||
|
|
||||||
export interface Accents {
|
export function colorRamp(color: Color): Scale {
|
||||||
"red": ColorToken,
|
let hue = color.hsl()[0];
|
||||||
"orange": ColorToken,
|
let endColor = chroma.hsl(hue, 0.88, 0.96);
|
||||||
"yellow": ColorToken,
|
let startColor = chroma.hsl(hue, 0.68, 0.12);
|
||||||
"green": ColorToken,
|
return chroma
|
||||||
"cyan": ColorToken,
|
.scale([startColor, color, endColor])
|
||||||
"blue": ColorToken,
|
.mode("hsl");
|
||||||
"violet": ColorToken,
|
|
||||||
"magenta": ColorToken,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createTheme(name: string, isLight: boolean, neutral: ColorToken[], accent: Accents): Theme {
|
// Neutral. 8 stops from 0 to 1.
|
||||||
|
|
||||||
|
export function createTheme(name: string, isLight: boolean, ramps: { [rampName: string]: Scale }, blend?: number): Theme {
|
||||||
if (isLight) {
|
if (isLight) {
|
||||||
neutral = [...neutral].reverse();
|
for (var rampName in ramps) {
|
||||||
|
ramps[rampName] = ramps[rampName].domain([1, 0]);
|
||||||
|
}
|
||||||
|
ramps.neutral = ramps.neutral.domain([7, 0]);
|
||||||
|
} else {
|
||||||
|
ramps.neutral = ramps.neutral.domain([0, 7]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blend === undefined) {
|
||||||
|
blend = isLight ? 0.12 : 0.24;
|
||||||
|
}
|
||||||
|
|
||||||
|
function rampColor(ramp: Scale, index: number): ColorToken {
|
||||||
|
return color(ramp(index).hex());
|
||||||
}
|
}
|
||||||
let blend = isLight ? 0.12 : 0.24;
|
|
||||||
|
|
||||||
const backgroundColor = {
|
const backgroundColor = {
|
||||||
|
// Title bar
|
||||||
100: {
|
100: {
|
||||||
base: neutral[1],
|
base: rampColor(ramps.neutral, 1.25),
|
||||||
hovered: withOpacity(neutral[2], blend),
|
hovered: rampColor(ramps.neutral, 1.5),
|
||||||
active: withOpacity(neutral[2], blend * 1.5),
|
active: rampColor(ramps.neutral, 1.75),
|
||||||
focused: withOpacity(neutral[2], blend),
|
|
||||||
},
|
},
|
||||||
|
// Midground (panels, etc)
|
||||||
300: {
|
300: {
|
||||||
base: neutral[1],
|
base: rampColor(ramps.neutral, 1),
|
||||||
hovered: withOpacity(neutral[2], blend),
|
hovered: rampColor(ramps.neutral, 1.25),
|
||||||
active: withOpacity(neutral[2], blend * 1.5),
|
active: rampColor(ramps.neutral, 1.5),
|
||||||
focused: withOpacity(neutral[2], blend),
|
|
||||||
},
|
},
|
||||||
|
// Editor
|
||||||
500: {
|
500: {
|
||||||
base: neutral[0],
|
base: rampColor(ramps.neutral, 0),
|
||||||
hovered: withOpacity(neutral[1], blend),
|
hovered: rampColor(ramps.neutral, 0.25),
|
||||||
active: withOpacity(neutral[1], blend * 1.5),
|
active: rampColor(ramps.neutral, 0.5),
|
||||||
focused: withOpacity(neutral[1], blend),
|
|
||||||
},
|
},
|
||||||
on300: {
|
on300: {
|
||||||
base: neutral[0],
|
base: rampColor(ramps.neutral, 0),
|
||||||
hovered: withOpacity(neutral[1], blend),
|
hovered: rampColor(ramps.neutral, 0.25),
|
||||||
active: withOpacity(neutral[1], blend * 2),
|
active: rampColor(ramps.neutral, 0.5),
|
||||||
focused: withOpacity(neutral[1], blend),
|
|
||||||
},
|
},
|
||||||
on500: {
|
on500: {
|
||||||
base: neutral[1],
|
base: rampColor(ramps.neutral, 1.25),
|
||||||
hovered: withOpacity(neutral[2], blend),
|
hovered: rampColor(ramps.neutral, 1.5),
|
||||||
active: withOpacity(neutral[2], blend * 2),
|
active: rampColor(ramps.neutral, 1.75),
|
||||||
focused: withOpacity(neutral[2], blend),
|
|
||||||
},
|
},
|
||||||
ok: {
|
ok: {
|
||||||
base: withOpacity(accent.green, 0.15),
|
base: withOpacity(rampColor(ramps.green, 0.5), 0.15),
|
||||||
hovered: withOpacity(accent.green, 0.20),
|
hovered: withOpacity(rampColor(ramps.green, 0.5), 0.20),
|
||||||
active: withOpacity(accent.green, 0.25),
|
active: withOpacity(rampColor(ramps.green, 0.5), 0.25),
|
||||||
focused: withOpacity(accent.green, 0.20),
|
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
base: withOpacity(accent.red, 0.15),
|
base: withOpacity(rampColor(ramps.red, 0.5), 0.15),
|
||||||
hovered: withOpacity(accent.red, 0.20),
|
hovered: withOpacity(rampColor(ramps.red, 0.5), 0.20),
|
||||||
active: withOpacity(accent.red, 0.25),
|
active: withOpacity(rampColor(ramps.red, 0.5), 0.25),
|
||||||
focused: withOpacity(accent.red, 0.20),
|
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
base: withOpacity(accent.yellow, 0.15),
|
base: withOpacity(rampColor(ramps.yellow, 0.5), 0.15),
|
||||||
hovered: withOpacity(accent.yellow, 0.20),
|
hovered: withOpacity(rampColor(ramps.yellow, 0.5), 0.20),
|
||||||
active: withOpacity(accent.yellow, 0.25),
|
active: withOpacity(rampColor(ramps.yellow, 0.5), 0.25),
|
||||||
focused: withOpacity(accent.yellow, 0.20),
|
|
||||||
},
|
},
|
||||||
info: {
|
info: {
|
||||||
base: withOpacity(accent.blue, 0.15),
|
base: withOpacity(rampColor(ramps.blue, 0.5), 0.15),
|
||||||
hovered: withOpacity(accent.blue, 0.20),
|
hovered: withOpacity(rampColor(ramps.blue, 0.5), 0.20),
|
||||||
active: withOpacity(accent.blue, 0.25),
|
active: withOpacity(rampColor(ramps.blue, 0.5), 0.25),
|
||||||
focused: withOpacity(accent.blue, 0.20),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const borderColor = {
|
const borderColor = {
|
||||||
primary: neutral[0],
|
primary: rampColor(ramps.neutral, isLight ? 2 : 0),
|
||||||
secondary: neutral[1],
|
secondary: rampColor(ramps.neutral, isLight ? 2 : 1),
|
||||||
muted: neutral[3],
|
muted: rampColor(ramps.neutral, isLight ? 4 : 3),
|
||||||
focused: neutral[3],
|
active: rampColor(ramps.neutral, isLight ? 4 : 3),
|
||||||
active: neutral[3],
|
onMedia: withOpacity(rampColor(ramps.neutral, 0), 0.1),
|
||||||
onMedia: withOpacity(neutral[0], 0.1),
|
ok: withOpacity(rampColor(ramps.green, 0.5), 0.15),
|
||||||
ok: withOpacity(accent.green, 0.15),
|
error: withOpacity(rampColor(ramps.red, 0.5), 0.15),
|
||||||
error: withOpacity(accent.red, 0.15),
|
warning: withOpacity(rampColor(ramps.yellow, 0.5), 0.15),
|
||||||
warning: withOpacity(accent.yellow, 0.15),
|
info: withOpacity(rampColor(ramps.blue, 0.5), 0.15),
|
||||||
info: withOpacity(accent.blue, 0.15),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const textColor = {
|
const textColor = {
|
||||||
primary: neutral[6],
|
primary: rampColor(ramps.neutral, 6),
|
||||||
secondary: neutral[5],
|
secondary: rampColor(ramps.neutral, 5),
|
||||||
muted: neutral[5],
|
muted: rampColor(ramps.neutral, 5),
|
||||||
placeholder: neutral[4],
|
placeholder: rampColor(ramps.neutral, 4),
|
||||||
active: neutral[7],
|
active: rampColor(ramps.neutral, 7),
|
||||||
feature: accent.blue,
|
feature: rampColor(ramps.blue, 0.5),
|
||||||
ok: accent.green,
|
ok: rampColor(ramps.green, 0.5),
|
||||||
error: accent.red,
|
error: rampColor(ramps.red, 0.5),
|
||||||
warning: accent.yellow,
|
warning: rampColor(ramps.yellow, 0.5),
|
||||||
info: accent.blue,
|
info: rampColor(ramps.blue, 0.5),
|
||||||
};
|
};
|
||||||
|
|
||||||
const player = {
|
const player = {
|
||||||
1: buildPlayer(accent.blue),
|
1: buildPlayer(rampColor(ramps.blue, 0.5)),
|
||||||
2: buildPlayer(accent.green),
|
2: buildPlayer(rampColor(ramps.green, 0.5)),
|
||||||
3: buildPlayer(accent.magenta),
|
3: buildPlayer(rampColor(ramps.magenta, 0.5)),
|
||||||
4: buildPlayer(accent.orange),
|
4: buildPlayer(rampColor(ramps.orange, 0.5)),
|
||||||
5: buildPlayer(accent.violet),
|
5: buildPlayer(rampColor(ramps.violet, 0.5)),
|
||||||
6: buildPlayer(accent.cyan),
|
6: buildPlayer(rampColor(ramps.cyan, 0.5)),
|
||||||
7: buildPlayer(accent.red),
|
7: buildPlayer(rampColor(ramps.red, 0.5)),
|
||||||
8: buildPlayer(accent.yellow),
|
8: buildPlayer(rampColor(ramps.yellow, 0.5)),
|
||||||
};
|
};
|
||||||
|
|
||||||
const editor = {
|
const editor = {
|
||||||
|
@ -118,20 +125,17 @@ export function createTheme(name: string, isLight: boolean, neutral: ColorToken[
|
||||||
indent_guide: borderColor.muted,
|
indent_guide: borderColor.muted,
|
||||||
indent_guide_active: borderColor.secondary,
|
indent_guide_active: borderColor.secondary,
|
||||||
line: {
|
line: {
|
||||||
active: withOpacity(neutral[7], 0.07),
|
active: rampColor(ramps.neutral, 1),
|
||||||
highlighted: withOpacity(neutral[7], 0.12),
|
highlighted: rampColor(ramps.neutral, 1.25), // TODO: Where is this used?
|
||||||
inserted: backgroundColor.ok.active,
|
|
||||||
deleted: backgroundColor.error.active,
|
|
||||||
modified: backgroundColor.info.active,
|
|
||||||
},
|
},
|
||||||
highlight: {
|
highlight: {
|
||||||
selection: player[1].selectionColor,
|
selection: player[1].selectionColor,
|
||||||
occurrence: withOpacity(neutral[7], blend / 2),
|
occurrence: withOpacity(rampColor(ramps.neutral, 2), blend),
|
||||||
activeOccurrence: withOpacity(neutral[7], blend),
|
activeOccurrence: withOpacity(rampColor(ramps.neutral, 2), blend * 2), // TODO: Not hooked up - https://github.com/zed-industries/zed/issues/751
|
||||||
matchingBracket: backgroundColor[500].active,
|
matchingBracket: backgroundColor[500].active, // TODO: Not hooked up
|
||||||
match: withOpacity(accent.violet, blend * 2),
|
match: rampColor(ramps.violet, 0.15),
|
||||||
activeMatch: withOpacity(accent.violet, blend * 3),
|
activeMatch: withOpacity(rampColor(ramps.violet, 0.4), blend * 2), // TODO: Not hooked up - https://github.com/zed-industries/zed/issues/751
|
||||||
related: backgroundColor[500].focused,
|
related: backgroundColor[500].hovered,
|
||||||
},
|
},
|
||||||
gutter: {
|
gutter: {
|
||||||
primary: textColor.placeholder,
|
primary: textColor.placeholder,
|
||||||
|
@ -141,59 +145,59 @@ export function createTheme(name: string, isLight: boolean, neutral: ColorToken[
|
||||||
|
|
||||||
const syntax: Syntax = {
|
const syntax: Syntax = {
|
||||||
primary: {
|
primary: {
|
||||||
color: neutral[7],
|
color: rampColor(ramps.neutral, 7),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
comment: {
|
comment: {
|
||||||
color: neutral[5],
|
color: rampColor(ramps.neutral, 5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
punctuation: {
|
punctuation: {
|
||||||
color: neutral[5],
|
color: rampColor(ramps.neutral, 6),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
constant: {
|
constant: {
|
||||||
color: neutral[4],
|
color: rampColor(ramps.neutral, 4),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
keyword: {
|
keyword: {
|
||||||
color: accent.blue,
|
color: rampColor(ramps.blue, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
function: {
|
function: {
|
||||||
color: accent.yellow,
|
color: rampColor(ramps.yellow, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
color: accent.cyan,
|
color: rampColor(ramps.cyan, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
variant: {
|
variant: {
|
||||||
color: accent.blue,
|
color: rampColor(ramps.blue, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
property: {
|
property: {
|
||||||
color: accent.blue,
|
color: rampColor(ramps.blue, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
enum: {
|
enum: {
|
||||||
color: accent.orange,
|
color: rampColor(ramps.orange, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
operator: {
|
operator: {
|
||||||
color: accent.orange,
|
color: rampColor(ramps.orange, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
string: {
|
string: {
|
||||||
color: accent.orange,
|
color: rampColor(ramps.orange, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
number: {
|
number: {
|
||||||
color: accent.green,
|
color: rampColor(ramps.green, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
boolean: {
|
boolean: {
|
||||||
color: accent.green,
|
color: rampColor(ramps.green, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
predictive: {
|
predictive: {
|
||||||
|
@ -201,7 +205,7 @@ export function createTheme(name: string, isLight: boolean, neutral: ColorToken[
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
color: accent.yellow,
|
color: rampColor(ramps.yellow, 0.5),
|
||||||
weight: fontWeights.bold,
|
weight: fontWeights.bold,
|
||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
|
@ -213,12 +217,12 @@ export function createTheme(name: string, isLight: boolean, neutral: ColorToken[
|
||||||
weight: fontWeights.bold,
|
weight: fontWeights.bold,
|
||||||
},
|
},
|
||||||
linkUri: {
|
linkUri: {
|
||||||
color: accent.green,
|
color: rampColor(ramps.green, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
underline: true,
|
underline: true,
|
||||||
},
|
},
|
||||||
linkText: {
|
linkText: {
|
||||||
color: accent.orange,
|
color: rampColor(ramps.orange, 0.5),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
italic: true,
|
italic: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,29 +1,19 @@
|
||||||
import { createTheme } from "./base16";
|
import chroma from "chroma-js";
|
||||||
import { color } from "../tokens";
|
import { colorRamp, createTheme } from "./base16";
|
||||||
|
|
||||||
const name = "cave";
|
const name = "cave";
|
||||||
|
|
||||||
const neutrals = [
|
const ramps = {
|
||||||
color("#19171c"),
|
neutral: chroma.scale(["#19171c", "#26232a", "#585260", "#655f6d", "#7e7887", "#8b8792", "#e2dfe7", "#efecf4"]),
|
||||||
color("#26232a"),
|
red: colorRamp(chroma("#be4678")),
|
||||||
color("#585260"),
|
orange: colorRamp(chroma("#aa573c")),
|
||||||
color("#655f6d"),
|
yellow: colorRamp(chroma("#a06e3b")),
|
||||||
color("#7e7887"),
|
green: colorRamp(chroma("#2a9292")),
|
||||||
color("#8b8792"),
|
cyan: colorRamp(chroma("#398bc6")),
|
||||||
color("#e2dfe7"),
|
blue: colorRamp(chroma("#576ddb")),
|
||||||
color("#efecf4"),
|
violet: colorRamp(chroma("#955ae7")),
|
||||||
];
|
magenta: colorRamp(chroma("#bf40bf")),
|
||||||
|
}
|
||||||
|
|
||||||
const colors = {
|
export const dark = createTheme(`${name}-dark`, false, ramps);
|
||||||
"red": color("#be4678"),
|
export const light = createTheme(`${name}-light`, true, ramps);
|
||||||
"orange": color("#aa573c"),
|
|
||||||
"yellow": color("#a06e3b"),
|
|
||||||
"green": color("#2a9292"),
|
|
||||||
"cyan": color("#398bc6"),
|
|
||||||
"blue": color("#576ddb"),
|
|
||||||
"violet": color("#955ae7"),
|
|
||||||
"magenta": color("#bf40bf"),
|
|
||||||
};
|
|
||||||
|
|
||||||
export const dark = createTheme(`${name}-dark`, false, neutrals, colors);
|
|
||||||
export const light = createTheme(`${name}-light`, true, neutrals, colors);
|
|
|
@ -1,240 +0,0 @@
|
||||||
import { colors, fontWeights, NumberToken } from "../tokens";
|
|
||||||
import { withOpacity } from "../utils/color";
|
|
||||||
import Theme, { buildPlayer, Syntax } from "./theme";
|
|
||||||
|
|
||||||
const backgroundColor = {
|
|
||||||
100: {
|
|
||||||
base: colors.neutral[750],
|
|
||||||
hovered: colors.neutral[725],
|
|
||||||
active: colors.neutral[800],
|
|
||||||
focused: colors.neutral[675],
|
|
||||||
},
|
|
||||||
300: {
|
|
||||||
base: colors.neutral[800],
|
|
||||||
hovered: colors.neutral[775],
|
|
||||||
active: colors.neutral[750],
|
|
||||||
focused: colors.neutral[775],
|
|
||||||
},
|
|
||||||
500: {
|
|
||||||
base: colors.neutral[900],
|
|
||||||
hovered: withOpacity(colors.neutral[0], 0.08),
|
|
||||||
active: withOpacity(colors.neutral[0], 0.12),
|
|
||||||
focused: colors.neutral[825],
|
|
||||||
},
|
|
||||||
on300: {
|
|
||||||
base: withOpacity(colors.neutral[850], 0.5),
|
|
||||||
hovered: colors.neutral[875],
|
|
||||||
active: colors.neutral[900],
|
|
||||||
focused: colors.neutral[875],
|
|
||||||
},
|
|
||||||
on500: {
|
|
||||||
base: colors.neutral[850],
|
|
||||||
hovered: colors.neutral[800],
|
|
||||||
active: colors.neutral[775],
|
|
||||||
focused: colors.neutral[800],
|
|
||||||
},
|
|
||||||
ok: {
|
|
||||||
base: withOpacity(colors.green[600], 0.15),
|
|
||||||
hovered: withOpacity(colors.green[600], 0.20),
|
|
||||||
active: withOpacity(colors.green[600], 0.25),
|
|
||||||
focused: withOpacity(colors.green[600], 0.20),
|
|
||||||
},
|
|
||||||
error: {
|
|
||||||
base: withOpacity(colors.red[600], 0.15),
|
|
||||||
hovered: withOpacity(colors.red[600], 0.20),
|
|
||||||
active: withOpacity(colors.red[600], 0.25),
|
|
||||||
focused: withOpacity(colors.red[600], 0.20),
|
|
||||||
},
|
|
||||||
warning: {
|
|
||||||
base: withOpacity(colors.amber[400], 0.15),
|
|
||||||
hovered: withOpacity(colors.amber[400], 0.20),
|
|
||||||
active: withOpacity(colors.amber[400], 0.25),
|
|
||||||
focused: withOpacity(colors.amber[400], 0.20),
|
|
||||||
},
|
|
||||||
info: {
|
|
||||||
base: withOpacity(colors.blue[500], 0.15),
|
|
||||||
hovered: withOpacity(colors.blue[500], 0.20),
|
|
||||||
active: withOpacity(colors.blue[500], 0.25),
|
|
||||||
focused: withOpacity(colors.blue[500], 0.20),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const borderColor = {
|
|
||||||
primary: colors.neutral[875],
|
|
||||||
secondary: colors.neutral[775],
|
|
||||||
muted: colors.neutral[675],
|
|
||||||
focused: colors.indigo[500],
|
|
||||||
active: colors.neutral[900],
|
|
||||||
onMedia: withOpacity(colors.neutral[875], 0.1),
|
|
||||||
ok: withOpacity(colors.green[600], 0.15),
|
|
||||||
error: withOpacity(colors.red[500], 0.15),
|
|
||||||
warning: withOpacity(colors.amber[400], 0.15),
|
|
||||||
info: withOpacity(colors.blue[500], 0.15),
|
|
||||||
};
|
|
||||||
|
|
||||||
const textColor = {
|
|
||||||
primary: colors.neutral[50],
|
|
||||||
secondary: colors.neutral[350],
|
|
||||||
muted: colors.neutral[450],
|
|
||||||
placeholder: colors.neutral[650],
|
|
||||||
active: colors.neutral[0],
|
|
||||||
feature: colors.blue[400],
|
|
||||||
ok: colors.green[600],
|
|
||||||
error: colors.red[400],
|
|
||||||
warning: colors.amber[300],
|
|
||||||
info: colors.blue[500],
|
|
||||||
};
|
|
||||||
|
|
||||||
const iconColor = {
|
|
||||||
primary: colors.neutral[200],
|
|
||||||
secondary: colors.neutral[350],
|
|
||||||
muted: colors.neutral[600],
|
|
||||||
placeholder: colors.neutral[700],
|
|
||||||
active: colors.neutral[0],
|
|
||||||
feature: colors.blue[500],
|
|
||||||
ok: colors.green[600],
|
|
||||||
error: colors.red[500],
|
|
||||||
warning: colors.amber[400],
|
|
||||||
info: colors.blue[600],
|
|
||||||
};
|
|
||||||
|
|
||||||
const player = {
|
|
||||||
1: buildPlayer(colors.blue[500]),
|
|
||||||
2: buildPlayer(colors.lime[500]),
|
|
||||||
3: buildPlayer(colors.fuschia[500]),
|
|
||||||
4: buildPlayer(colors.orange[500]),
|
|
||||||
5: buildPlayer(colors.purple[500]),
|
|
||||||
6: buildPlayer(colors.teal[400]),
|
|
||||||
7: buildPlayer(colors.pink[400]),
|
|
||||||
8: buildPlayer(colors.yellow[400]),
|
|
||||||
};
|
|
||||||
|
|
||||||
const editor = {
|
|
||||||
background: backgroundColor[500].base,
|
|
||||||
indent_guide: borderColor.muted,
|
|
||||||
indent_guide_active: borderColor.secondary,
|
|
||||||
line: {
|
|
||||||
active: withOpacity(colors.neutral[0], 0.07),
|
|
||||||
highlighted: withOpacity(colors.neutral[0], 0.12),
|
|
||||||
inserted: backgroundColor.ok.active,
|
|
||||||
deleted: backgroundColor.error.active,
|
|
||||||
modified: backgroundColor.info.active,
|
|
||||||
},
|
|
||||||
highlight: {
|
|
||||||
selection: player[1].selectionColor,
|
|
||||||
occurrence: withOpacity(colors.neutral[0], 0.12),
|
|
||||||
activeOccurrence: withOpacity(colors.neutral[0], 0.16),
|
|
||||||
matchingBracket: backgroundColor[500].active,
|
|
||||||
match: withOpacity(colors.violet[700], 0.5),
|
|
||||||
activeMatch: withOpacity(colors.violet[600], 0.7),
|
|
||||||
related: backgroundColor[500].focused,
|
|
||||||
},
|
|
||||||
gutter: {
|
|
||||||
primary: textColor.placeholder,
|
|
||||||
active: textColor.active,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const syntax: Syntax = {
|
|
||||||
primary: {
|
|
||||||
color: colors.neutral[150],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
comment: {
|
|
||||||
color: colors.neutral[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
punctuation: {
|
|
||||||
color: colors.neutral[200],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
constant: {
|
|
||||||
color: colors.neutral[150],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
keyword: {
|
|
||||||
color: colors.blue[400],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
function: {
|
|
||||||
color: colors.yellow[200],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
color: colors.teal[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
variant: {
|
|
||||||
color: colors.sky[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
property: {
|
|
||||||
color: colors.blue[400],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
enum: {
|
|
||||||
color: colors.orange[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
operator: {
|
|
||||||
color: colors.orange[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
string: {
|
|
||||||
color: colors.orange[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
number: {
|
|
||||||
color: colors.lime[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
boolean: {
|
|
||||||
color: colors.lime[300],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
predictive: {
|
|
||||||
color: textColor.muted,
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
color: colors.amber[500],
|
|
||||||
weight: fontWeights.bold,
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
color: textColor.feature,
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
color: textColor.feature,
|
|
||||||
weight: fontWeights.bold,
|
|
||||||
},
|
|
||||||
linkUri: {
|
|
||||||
color: colors.lime[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
underline: true,
|
|
||||||
},
|
|
||||||
linkText: {
|
|
||||||
color: colors.orange[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
italic: true,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const shadowAlpha: NumberToken = {
|
|
||||||
value: 0.32,
|
|
||||||
type: "number",
|
|
||||||
};
|
|
||||||
|
|
||||||
const theme: Theme = {
|
|
||||||
name: "dark",
|
|
||||||
backgroundColor,
|
|
||||||
borderColor,
|
|
||||||
textColor,
|
|
||||||
iconColor,
|
|
||||||
editor,
|
|
||||||
syntax,
|
|
||||||
player,
|
|
||||||
shadowAlpha,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default theme;
|
|
30
styles/src/themes/gruvbox.ts
Normal file
30
styles/src/themes/gruvbox.ts
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
import chroma from "chroma-js";
|
||||||
|
import { createTheme } from "./base16";
|
||||||
|
|
||||||
|
const name = "cave";
|
||||||
|
|
||||||
|
const colors = {
|
||||||
|
"red": chroma("#be4678"),
|
||||||
|
"orange": chroma("#aa573c"),
|
||||||
|
"yellow": chroma("#a06e3b"),
|
||||||
|
"green": chroma("#2a9292"),
|
||||||
|
"cyan": chroma("#398bc6"),
|
||||||
|
"blue": chroma("#576ddb"),
|
||||||
|
"violet": chroma("#955ae7"),
|
||||||
|
"magenta": chroma("#bf40bf"),
|
||||||
|
};
|
||||||
|
|
||||||
|
const ramps = {
|
||||||
|
neutral: chroma.scale(["#19171c", "#26232a", "#585260", "#655f6d", "#7e7887", "#8b8792", "#e2dfe7", "#efecf4"]),
|
||||||
|
red: chroma.scale([colors.red.darken(3), colors.red, colors.red.brighten(3)]),
|
||||||
|
orange: chroma.scale([colors.orange.darken(3), colors.orange, colors.orange.brighten(3)]),
|
||||||
|
yellow: chroma.scale([colors.yellow.darken(3), colors.yellow, colors.yellow.brighten(3)]),
|
||||||
|
green: chroma.scale([colors.green.darken(3), colors.green, colors.green.brighten(3)]),
|
||||||
|
cyan: chroma.scale([colors.cyan.darken(3), colors.cyan, colors.cyan.brighten(3)]),
|
||||||
|
blue: chroma.scale([colors.blue.darken(3), colors.blue, colors.blue.brighten(3)]),
|
||||||
|
violet: chroma.scale([colors.violet.darken(3), colors.violet, colors.violet.brighten(3)]),
|
||||||
|
magenta: chroma.scale([colors.magenta.darken(3), colors.magenta, colors.magenta.brighten(3)]),
|
||||||
|
}
|
||||||
|
|
||||||
|
export const dark = createTheme(`${name}-dark`, false, ramps);
|
||||||
|
export const light = createTheme(`${name}-light`, true, ramps);
|
|
@ -1,240 +0,0 @@
|
||||||
import { colors, fontWeights, NumberToken } from "../tokens";
|
|
||||||
import { withOpacity } from "../utils/color";
|
|
||||||
import Theme, { buildPlayer, Syntax } from "./theme";
|
|
||||||
|
|
||||||
const backgroundColor = {
|
|
||||||
100: {
|
|
||||||
base: colors.neutral[75],
|
|
||||||
hovered: colors.neutral[100],
|
|
||||||
active: colors.neutral[150],
|
|
||||||
focused: colors.neutral[100],
|
|
||||||
},
|
|
||||||
300: {
|
|
||||||
base: colors.neutral[25],
|
|
||||||
hovered: colors.neutral[75],
|
|
||||||
active: colors.neutral[100],
|
|
||||||
focused: colors.neutral[75],
|
|
||||||
},
|
|
||||||
500: {
|
|
||||||
base: colors.neutral[0],
|
|
||||||
hovered: withOpacity(colors.neutral[900], 0.03),
|
|
||||||
active: withOpacity(colors.neutral[900], 0.06),
|
|
||||||
focused: colors.neutral[50],
|
|
||||||
},
|
|
||||||
on300: {
|
|
||||||
base: colors.neutral[50],
|
|
||||||
hovered: colors.neutral[100],
|
|
||||||
active: colors.neutral[150],
|
|
||||||
focused: colors.neutral[100],
|
|
||||||
},
|
|
||||||
on500: {
|
|
||||||
base: colors.neutral[50],
|
|
||||||
hovered: colors.neutral[25],
|
|
||||||
active: colors.neutral[0],
|
|
||||||
focused: colors.neutral[25],
|
|
||||||
},
|
|
||||||
ok: {
|
|
||||||
base: withOpacity(colors.green[600], 0.15),
|
|
||||||
hovered: withOpacity(colors.green[600], 0.20),
|
|
||||||
active: withOpacity(colors.green[600], 0.25),
|
|
||||||
focused: withOpacity(colors.green[600], 0.20),
|
|
||||||
},
|
|
||||||
error: {
|
|
||||||
base: withOpacity(colors.red[600], 0.15),
|
|
||||||
hovered: withOpacity(colors.red[600], 0.20),
|
|
||||||
active: withOpacity(colors.red[600], 0.25),
|
|
||||||
focused: withOpacity(colors.red[600], 0.20),
|
|
||||||
},
|
|
||||||
warning: {
|
|
||||||
base: withOpacity(colors.amber[400], 0.15),
|
|
||||||
hovered: withOpacity(colors.amber[400], 0.20),
|
|
||||||
active: withOpacity(colors.amber[400], 0.25),
|
|
||||||
focused: withOpacity(colors.amber[400], 0.20),
|
|
||||||
},
|
|
||||||
info: {
|
|
||||||
base: withOpacity(colors.blue[500], 0.15),
|
|
||||||
hovered: withOpacity(colors.blue[500], 0.20),
|
|
||||||
active: withOpacity(colors.blue[500], 0.25),
|
|
||||||
focused: withOpacity(colors.blue[500], 0.20),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const borderColor = {
|
|
||||||
primary: colors.neutral[150],
|
|
||||||
secondary: colors.neutral[150],
|
|
||||||
muted: colors.neutral[100],
|
|
||||||
focused: colors.indigo[500],
|
|
||||||
active: colors.neutral[250],
|
|
||||||
onMedia: withOpacity(colors.neutral[250], 0.3),
|
|
||||||
ok: withOpacity(colors.green[600], 0.15),
|
|
||||||
error: withOpacity(colors.red[500], 0.15),
|
|
||||||
warning: withOpacity(colors.amber[400], 0.15),
|
|
||||||
info: withOpacity(colors.blue[500], 0.15),
|
|
||||||
};
|
|
||||||
|
|
||||||
const textColor = {
|
|
||||||
primary: colors.neutral[750],
|
|
||||||
secondary: colors.neutral[650],
|
|
||||||
muted: colors.neutral[550],
|
|
||||||
placeholder: colors.neutral[450],
|
|
||||||
active: colors.neutral[900],
|
|
||||||
feature: colors.indigo[500],
|
|
||||||
ok: colors.green[500],
|
|
||||||
error: colors.red[500],
|
|
||||||
warning: colors.yellow[500],
|
|
||||||
info: colors.blue[500],
|
|
||||||
};
|
|
||||||
|
|
||||||
const iconColor = {
|
|
||||||
primary: colors.neutral[700],
|
|
||||||
secondary: colors.neutral[500],
|
|
||||||
muted: colors.neutral[350],
|
|
||||||
placeholder: colors.neutral[300],
|
|
||||||
active: colors.neutral[900],
|
|
||||||
feature: colors.indigo[500],
|
|
||||||
ok: colors.green[600],
|
|
||||||
error: colors.red[600],
|
|
||||||
warning: colors.yellow[400],
|
|
||||||
info: colors.blue[600],
|
|
||||||
};
|
|
||||||
|
|
||||||
const player = {
|
|
||||||
1: buildPlayer(colors.blue[500]),
|
|
||||||
2: buildPlayer(colors.emerald[400]),
|
|
||||||
3: buildPlayer(colors.fuschia[400]),
|
|
||||||
4: buildPlayer(colors.orange[400]),
|
|
||||||
5: buildPlayer(colors.purple[400]),
|
|
||||||
6: buildPlayer(colors.teal[400]),
|
|
||||||
7: buildPlayer(colors.pink[400]),
|
|
||||||
8: buildPlayer(colors.yellow[400]),
|
|
||||||
};
|
|
||||||
|
|
||||||
const editor = {
|
|
||||||
background: backgroundColor[500].base,
|
|
||||||
indent_guide: borderColor.muted,
|
|
||||||
indent_guide_active: borderColor.secondary,
|
|
||||||
line: {
|
|
||||||
active: withOpacity(colors.neutral[900], 0.06),
|
|
||||||
highlighted: withOpacity(colors.neutral[900], 0.12),
|
|
||||||
inserted: backgroundColor.ok.active,
|
|
||||||
deleted: backgroundColor.error.active,
|
|
||||||
modified: backgroundColor.info.active,
|
|
||||||
},
|
|
||||||
highlight: {
|
|
||||||
selection: player[1].selectionColor,
|
|
||||||
occurrence: withOpacity(colors.neutral[900], 0.06),
|
|
||||||
activeOccurrence: withOpacity(colors.neutral[900], 0.16),
|
|
||||||
matchingBracket: colors.neutral[0],
|
|
||||||
match: colors.yellow[100],
|
|
||||||
activeMatch: colors.yellow[200],
|
|
||||||
related: colors.neutral[0],
|
|
||||||
},
|
|
||||||
gutter: {
|
|
||||||
primary: colors.neutral[300],
|
|
||||||
active: textColor.active,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const syntax: Syntax = {
|
|
||||||
primary: {
|
|
||||||
color: colors.neutral[800],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
comment: {
|
|
||||||
color: colors.neutral[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
punctuation: {
|
|
||||||
color: colors.neutral[600],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
constant: {
|
|
||||||
color: colors.neutral[800],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
keyword: {
|
|
||||||
color: colors.indigo[700],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
function: {
|
|
||||||
color: colors.orange[600],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
color: colors.yellow[600],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
variant: {
|
|
||||||
color: colors.rose[700],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
property: {
|
|
||||||
color: colors.emerald[700],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
enum: {
|
|
||||||
color: colors.red[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
operator: {
|
|
||||||
color: colors.red[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
string: {
|
|
||||||
color: colors.red[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
number: {
|
|
||||||
color: colors.indigo[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
boolean: {
|
|
||||||
color: colors.red[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
predictive: {
|
|
||||||
color: textColor.placeholder,
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
color: colors.sky[500],
|
|
||||||
weight: fontWeights.bold,
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
color: textColor.feature,
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
color: textColor.feature,
|
|
||||||
weight: fontWeights.bold,
|
|
||||||
},
|
|
||||||
linkUri: {
|
|
||||||
color: colors.lime[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
underline: true
|
|
||||||
},
|
|
||||||
linkText: {
|
|
||||||
color: colors.red[500],
|
|
||||||
weight: fontWeights.normal,
|
|
||||||
italic: true
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const shadowAlpha: NumberToken = {
|
|
||||||
value: 0.12,
|
|
||||||
type: "number",
|
|
||||||
};
|
|
||||||
|
|
||||||
const theme: Theme = {
|
|
||||||
name: "light",
|
|
||||||
backgroundColor,
|
|
||||||
borderColor,
|
|
||||||
textColor,
|
|
||||||
iconColor,
|
|
||||||
editor,
|
|
||||||
syntax,
|
|
||||||
player,
|
|
||||||
shadowAlpha,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default theme;
|
|
|
@ -1,29 +1,19 @@
|
||||||
import { createTheme } from "./base16";
|
import chroma from "chroma-js";
|
||||||
import { color } from "../tokens";
|
import { colorRamp, createTheme } from "./base16";
|
||||||
|
|
||||||
const name = "solarized";
|
const name = "solarized";
|
||||||
|
|
||||||
const neutrals = [
|
const ramps = {
|
||||||
color("#002b36"),
|
neutral: chroma.scale(["#002b36", "#073642", "#586e75", "#657b83", "#839496", "#93a1a1", "#eee8d5", "#fdf6e3"]),
|
||||||
color("#073642"),
|
red: colorRamp(chroma("#dc322f")),
|
||||||
color("#586e75"),
|
orange: colorRamp(chroma("#cb4b16")),
|
||||||
color("#657b83"),
|
yellow: colorRamp(chroma("#b58900")),
|
||||||
color("#839496"),
|
green: colorRamp(chroma("#859900")),
|
||||||
color("#93a1a1"),
|
cyan: colorRamp(chroma("#2aa198")),
|
||||||
color("#eee8d5"),
|
blue: colorRamp(chroma("#268bd2")),
|
||||||
color("#fdf6e3"),
|
violet: colorRamp(chroma("#6c71c4")),
|
||||||
];
|
magenta: colorRamp(chroma("#d33682")),
|
||||||
|
}
|
||||||
|
|
||||||
const colors = {
|
export const dark = createTheme(`${name}-dark`, false, ramps);
|
||||||
"red": color("#dc322f"),
|
export const light = createTheme(`${name}-light`, true, ramps);
|
||||||
"orange": color("#cb4b16"),
|
|
||||||
"yellow": color("#b58900"),
|
|
||||||
"green": color("#859900"),
|
|
||||||
"cyan": color("#2aa198"),
|
|
||||||
"blue": color("#268bd2"),
|
|
||||||
"violet": color("#6c71c4"),
|
|
||||||
"magenta": color("#d33682"),
|
|
||||||
};
|
|
||||||
|
|
||||||
export const dark = createTheme(`${name}-dark`, false, neutrals, colors);
|
|
||||||
export const light = createTheme(`${name}-light`, true, neutrals, colors);
|
|
|
@ -1,29 +1,19 @@
|
||||||
import { createTheme } from "./base16";
|
import chroma from "chroma-js";
|
||||||
import { color } from "../tokens";
|
import { colorRamp, createTheme } from "./base16";
|
||||||
|
|
||||||
const name = "sulphurpool";
|
const name = "sulphurpool";
|
||||||
|
|
||||||
const neutrals = [
|
const ramps = {
|
||||||
color("#202746"),
|
neutral: chroma.scale(["#202746", "#293256", "#5e6687", "#6b7394", "#898ea4", "#979db4", "#dfe2f1", "#f5f7ff"]),
|
||||||
color("#293256"),
|
red: colorRamp(chroma("#c94922")),
|
||||||
color("#5e6687"),
|
orange: colorRamp(chroma("#c76b29")),
|
||||||
color("#6b7394"),
|
yellow: colorRamp(chroma("#c08b30")),
|
||||||
color("#898ea4"),
|
green: colorRamp(chroma("#ac9739")),
|
||||||
color("#979db4"),
|
cyan: colorRamp(chroma("#22a2c9")),
|
||||||
color("#dfe2f1"),
|
blue: colorRamp(chroma("#3d8fd1")),
|
||||||
color("#f5f7ff"),
|
violet: colorRamp(chroma("#6679cc")),
|
||||||
]
|
magenta: colorRamp(chroma("#9c637a")),
|
||||||
|
}
|
||||||
|
|
||||||
const colors = {
|
export const dark = createTheme(`${name}-dark`, false, ramps);
|
||||||
"red": color("#c94922"),
|
export const light = createTheme(`${name}-light`, true, ramps);
|
||||||
"orange": color("#c76b29"),
|
|
||||||
"yellow": color("#c08b30"),
|
|
||||||
"green": color("#ac9739"),
|
|
||||||
"cyan": color("#22a2c9"),
|
|
||||||
"blue": color("#3d8fd1"),
|
|
||||||
"violet": color("#6679cc"),
|
|
||||||
"magenta": color("#9c637a"),
|
|
||||||
};
|
|
||||||
|
|
||||||
export const dark = createTheme(`${name}-dark`, false, neutrals, colors);
|
|
||||||
export const light = createTheme(`${name}-light`, true, neutrals, colors);
|
|
|
@ -32,7 +32,6 @@ export interface BackgroundColorSet {
|
||||||
base: ColorToken;
|
base: ColorToken;
|
||||||
hovered: ColorToken;
|
hovered: ColorToken;
|
||||||
active: ColorToken;
|
active: ColorToken;
|
||||||
focused: ColorToken;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Syntax {
|
export interface Syntax {
|
||||||
|
@ -85,7 +84,6 @@ export default interface Theme {
|
||||||
primary: ColorToken;
|
primary: ColorToken;
|
||||||
secondary: ColorToken;
|
secondary: ColorToken;
|
||||||
muted: ColorToken;
|
muted: ColorToken;
|
||||||
focused: ColorToken;
|
|
||||||
active: ColorToken;
|
active: ColorToken;
|
||||||
/**
|
/**
|
||||||
* Used for rendering borders on top of media like avatars, images, video, etc.
|
* Used for rendering borders on top of media like avatars, images, video, etc.
|
||||||
|
@ -127,9 +125,6 @@ export default interface Theme {
|
||||||
line: {
|
line: {
|
||||||
active: ColorToken;
|
active: ColorToken;
|
||||||
highlighted: ColorToken;
|
highlighted: ColorToken;
|
||||||
inserted: ColorToken;
|
|
||||||
deleted: ColorToken;
|
|
||||||
modified: ColorToken;
|
|
||||||
};
|
};
|
||||||
highlight: {
|
highlight: {
|
||||||
selection: ColorToken;
|
selection: ColorToken;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue