mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Fix typos detected by crate-ci/typos
This commit is contained in:
parent
df67917768
commit
57400e9687
@ -1024,7 +1024,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SCSS attibute selector strings",
|
||||
"name": "SCSS attribute selector strings",
|
||||
"scope": ["meta.attribute-selector.scss"],
|
||||
"settings": {
|
||||
"foreground": "#F1FA8C"
|
||||
|
@ -892,14 +892,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Variable Assignment",
|
||||
"name": "CoffeeScript Variable Assignment",
|
||||
"scope": "variable.assignment.coffee",
|
||||
"settings": {
|
||||
"foreground": "#31e1eb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Parameter Function",
|
||||
"name": "CoffeeScript Parameter Function",
|
||||
"scope": "variable.parameter.function.coffee",
|
||||
"settings": {
|
||||
"foreground": "#403f53"
|
||||
@ -1708,7 +1708,7 @@
|
||||
"keyword.operator.type",
|
||||
"keyword.operator",
|
||||
"keyword",
|
||||
"punctuation.definintion.string",
|
||||
"punctuation.definition.string",
|
||||
"punctuation",
|
||||
"variable.other.readwrite.js",
|
||||
"storage.type",
|
||||
|
@ -926,14 +926,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Variable Assignment",
|
||||
"name": "CoffeeScript Variable Assignment",
|
||||
"scope": "variable.assignment.coffee",
|
||||
"settings": {
|
||||
"foreground": "#31e1eb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Parameter Function",
|
||||
"name": "CoffeeScript Parameter Function",
|
||||
"scope": "variable.parameter.function.coffee",
|
||||
"settings": {
|
||||
"foreground": "#d6deeb"
|
||||
@ -1817,7 +1817,7 @@
|
||||
"keyword.operator.type",
|
||||
"keyword.operator",
|
||||
"keyword",
|
||||
"punctuation.definintion.string",
|
||||
"punctuation.definition.string",
|
||||
"punctuation",
|
||||
"variable.other.readwrite.js",
|
||||
"storage.type",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -389,7 +389,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -390,7 +390,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -389,7 +389,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -389,7 +389,7 @@
|
||||
"source.reason variable.interpolation",
|
||||
"punctuation.definition.directive",
|
||||
"storage.type.modifier",
|
||||
"keyword.other.class.fileds",
|
||||
"keyword.other.class.fields",
|
||||
"source.toml entity.other.attribute-name",
|
||||
"source.css entity.name.tag.custom",
|
||||
"sharing.modifier",
|
||||
|
@ -797,14 +797,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Variable Assignment",
|
||||
"name": "CoffeeScript Variable Assignment",
|
||||
"scope": "variable.assignment.coffee",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Parameter Function",
|
||||
"name": "CoffeeScript Parameter Function",
|
||||
"scope": "variable.parameter.function.coffee",
|
||||
"settings": {
|
||||
"foreground": "#bfc7d5"
|
||||
@ -1523,14 +1523,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute names",
|
||||
"name": "handlebars entity attribute names",
|
||||
"scope": "entity.other.attribute-name.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute values",
|
||||
"name": "handlebars entity attribute values",
|
||||
"scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#7986E7"
|
||||
@ -1558,7 +1558,7 @@
|
||||
"keyword.operator.expression.in",
|
||||
"keyword.operator.type",
|
||||
"punctuation.section.embedded.js",
|
||||
"punctuation.definintion.string",
|
||||
"punctuation.definition.string",
|
||||
"punctuation"
|
||||
],
|
||||
"settings": {
|
||||
|
@ -797,14 +797,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Variable Assignment",
|
||||
"name": "CoffeeScript Variable Assignment",
|
||||
"scope": "variable.assignment.coffee",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Parameter Function",
|
||||
"name": "CoffeeScript Parameter Function",
|
||||
"scope": "variable.parameter.function.coffee",
|
||||
"settings": {
|
||||
"foreground": "#bfc7d5"
|
||||
@ -1523,14 +1523,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute names",
|
||||
"name": "handlebars entity attribute names",
|
||||
"scope": "entity.other.attribute-name.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute values",
|
||||
"name": "handlebars entity attribute values",
|
||||
"scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#7986E7"
|
||||
@ -1558,7 +1558,7 @@
|
||||
"keyword.operator.expression.in",
|
||||
"keyword.operator.type",
|
||||
"punctuation.section.embedded.js",
|
||||
"punctuation.definintion.string",
|
||||
"punctuation.definition.string",
|
||||
"punctuation"
|
||||
],
|
||||
"settings": {
|
||||
|
@ -797,14 +797,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Variable Assignment",
|
||||
"name": "CoffeeScript Variable Assignment",
|
||||
"scope": "variable.assignment.coffee",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CoffeScript Parameter Function",
|
||||
"name": "CoffeeScript Parameter Function",
|
||||
"scope": "variable.parameter.function.coffee",
|
||||
"settings": {
|
||||
"foreground": "#bfc7d5"
|
||||
@ -1523,14 +1523,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute names",
|
||||
"name": "handlebars entity attribute names",
|
||||
"scope": "entity.other.attribute-name.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#89DDFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "handlebars enitity attribute values",
|
||||
"name": "handlebars entity attribute values",
|
||||
"scope": "entity.other.attribute-value.handlebars variable.parameter.handlebars",
|
||||
"settings": {
|
||||
"foreground": "#7986E7"
|
||||
@ -1558,7 +1558,7 @@
|
||||
"keyword.operator.expression.in",
|
||||
"keyword.operator.type",
|
||||
"punctuation.section.embedded.js",
|
||||
"punctuation.definintion.string",
|
||||
"punctuation.definition.string",
|
||||
"punctuation"
|
||||
],
|
||||
"settings": {
|
||||
|
@ -81,8 +81,8 @@ impl PromptChain {
|
||||
|
||||
pub fn generate(&self, truncate: bool) -> anyhow::Result<(String, usize)> {
|
||||
// Argsort based on Prompt Priority
|
||||
let seperator = "\n";
|
||||
let seperator_tokens = self.args.model.count_tokens(seperator)?;
|
||||
let separator = "\n";
|
||||
let separator_tokens = self.args.model.count_tokens(separator)?;
|
||||
let mut sorted_indices = (0..self.templates.len()).collect::<Vec<_>>();
|
||||
sorted_indices.sort_by_key(|&i| Reverse(&self.templates[i].0));
|
||||
|
||||
@ -104,7 +104,7 @@ impl PromptChain {
|
||||
prompts[idx] = template_prompt;
|
||||
|
||||
if let Some(remaining_tokens) = tokens_outstanding {
|
||||
let new_tokens = prompt_token_count + seperator_tokens;
|
||||
let new_tokens = prompt_token_count + separator_tokens;
|
||||
tokens_outstanding = if remaining_tokens > new_tokens {
|
||||
Some(remaining_tokens - new_tokens)
|
||||
} else {
|
||||
@ -117,9 +117,9 @@ impl PromptChain {
|
||||
|
||||
prompts.retain(|x| x != "");
|
||||
|
||||
let full_prompt = prompts.join(seperator);
|
||||
let full_prompt = prompts.join(separator);
|
||||
let total_token_count = self.args.model.count_tokens(&full_prompt)?;
|
||||
anyhow::Ok((prompts.join(seperator), total_token_count))
|
||||
anyhow::Ok((prompts.join(separator), total_token_count))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ impl PromptTemplate for RepositoryContext {
|
||||
let mut prompt = String::new();
|
||||
|
||||
let mut remaining_tokens = max_token_length.clone();
|
||||
let seperator_token_length = args.model.count_tokens("\n")?;
|
||||
let separator_token_length = args.model.count_tokens("\n")?;
|
||||
for snippet in &args.snippets {
|
||||
let mut snippet_prompt = template.to_string();
|
||||
let content = snippet.to_string();
|
||||
@ -79,9 +79,9 @@ impl PromptTemplate for RepositoryContext {
|
||||
if let Some(tokens_left) = remaining_tokens {
|
||||
if tokens_left >= token_count {
|
||||
writeln!(prompt, "{snippet_prompt}").unwrap();
|
||||
remaining_tokens = if tokens_left >= (token_count + seperator_token_length)
|
||||
remaining_tokens = if tokens_left >= (token_count + separator_token_length)
|
||||
{
|
||||
Some(tokens_left - token_count - seperator_token_length)
|
||||
Some(tokens_left - token_count - separator_token_length)
|
||||
} else {
|
||||
Some(0)
|
||||
};
|
||||
|
@ -273,7 +273,7 @@ impl CompletionProvider for OpenAICompletionProvider {
|
||||
) -> BoxFuture<'static, Result<BoxStream<'static, Result<String>>>> {
|
||||
// Currently the CompletionRequest for OpenAI, includes a 'model' parameter
|
||||
// This means that the model is determined by the CompletionRequest and not the CompletionProvider,
|
||||
// which is currently model based, due to the langauge model.
|
||||
// which is currently model based, due to the language model.
|
||||
// At some point in the future we should rectify this.
|
||||
let credential = self.credential.read().clone();
|
||||
let request = stream_completion(credential, self.executor.clone(), prompt);
|
||||
|
@ -2917,7 +2917,7 @@ impl InlineAssistant {
|
||||
let semantic_permissioned = self.semantic_permissioned(cx);
|
||||
if let Some(semantic_index) = SemanticIndex::global(cx) {
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
// This has to be updated to accomodate for semantic_permissions
|
||||
// This has to be updated to accommodate for semantic_permissions
|
||||
if semantic_permissioned.await.unwrap_or(false) {
|
||||
semantic_index
|
||||
.update(&mut cx, |index, cx| index.index_project(project, cx))?
|
||||
|
@ -149,7 +149,7 @@ impl Database {
|
||||
.await?;
|
||||
|
||||
// If the buffer epoch hasn't changed since the client lost
|
||||
// connection, then the client's buffer can be syncronized with
|
||||
// connection, then the client's buffer can be synchronized with
|
||||
// the server's buffer.
|
||||
if buffer.epoch as u64 != client_buffer.epoch {
|
||||
log::info!("can't rejoin buffer, epoch has changed");
|
||||
@ -962,7 +962,7 @@ fn version_from_storage(version: &Vec<storage::VectorClockEntry>) -> Vec<proto::
|
||||
.collect()
|
||||
}
|
||||
|
||||
// This is currently a manual copy of the deserialization code in the client's langauge crate
|
||||
// This is currently a manual copy of the deserialization code in the client's language crate
|
||||
pub fn operation_from_wire(operation: proto::Operation) -> Option<text::Operation> {
|
||||
match operation.variant? {
|
||||
proto::operation::Variant::Edit(edit) => Some(text::Operation::Edit(EditOperation {
|
||||
|
@ -203,7 +203,7 @@ async fn test_core_channels(
|
||||
executor.run_until_parked();
|
||||
|
||||
// Observe that client B is now an admin of channel A, and that
|
||||
// their admin priveleges extend to subchannels of channel A.
|
||||
// their admin privileges extend to subchannels of channel A.
|
||||
assert_channel_invitations(client_b.channel_store(), cx_b, &[]);
|
||||
assert_channels(
|
||||
client_b.channel_store(),
|
||||
|
@ -1201,7 +1201,7 @@ async fn test_on_input_format_from_host_to_guest(
|
||||
executor.run_until_parked();
|
||||
|
||||
// Receive an OnTypeFormatting request as the host's language server.
|
||||
// Return some formattings from the host's language server.
|
||||
// Return some formatting from the host's language server.
|
||||
fake_language_server.handle_request::<lsp::request::OnTypeFormatting, _, _>(
|
||||
|params, _| async move {
|
||||
assert_eq!(
|
||||
@ -1220,7 +1220,7 @@ async fn test_on_input_format_from_host_to_guest(
|
||||
},
|
||||
);
|
||||
|
||||
// Open the buffer on the guest and see that the formattings worked
|
||||
// Open the buffer on the guest and see that the formatting worked
|
||||
let buffer_b = project_b
|
||||
.update(cx_b, |p, cx| p.open_buffer((worktree_id, "main.rs"), cx))
|
||||
.await
|
||||
@ -1339,7 +1339,7 @@ async fn test_on_input_format_from_guest_to_host(
|
||||
});
|
||||
|
||||
// Receive an OnTypeFormatting request as the host's language server.
|
||||
// Return some formattings from the host's language server.
|
||||
// Return some formatting from the host's language server.
|
||||
executor.start_waiting();
|
||||
fake_language_server
|
||||
.handle_request::<lsp::request::OnTypeFormatting, _, _>(|params, _| async move {
|
||||
@ -1362,7 +1362,7 @@ async fn test_on_input_format_from_guest_to_host(
|
||||
.unwrap();
|
||||
executor.finish_waiting();
|
||||
|
||||
// Open the buffer on the host and see that the formattings worked
|
||||
// Open the buffer on the host and see that the formatting worked
|
||||
let buffer_a = project_a
|
||||
.update(cx_a, |p, cx| p.open_buffer((worktree_id, "main.rs"), cx))
|
||||
.await
|
||||
@ -1836,7 +1836,7 @@ async fn test_inlay_hint_refresh_is_forwarded(
|
||||
assert_eq!(
|
||||
inlay_cache.version(),
|
||||
1,
|
||||
"Should update cache verison after first hints"
|
||||
"Should update cache version after first hints"
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -111,7 +111,7 @@ impl ChannelModal {
|
||||
.detach();
|
||||
}
|
||||
|
||||
fn set_channel_visiblity(&mut self, selection: &Selection, cx: &mut ViewContext<Self>) {
|
||||
fn set_channel_visibility(&mut self, selection: &Selection, cx: &mut ViewContext<Self>) {
|
||||
self.channel_store.update(cx, |channel_store, cx| {
|
||||
channel_store
|
||||
.set_channel_visibility(
|
||||
@ -189,7 +189,7 @@ impl Render for ChannelModal {
|
||||
ui::Selection::Unselected
|
||||
},
|
||||
)
|
||||
.on_click(cx.listener(Self::set_channel_visiblity)),
|
||||
.on_click(cx.listener(Self::set_channel_visibility)),
|
||||
)
|
||||
.child(Label::new("Public").size(LabelSize::Small)),
|
||||
)
|
||||
|
@ -96,7 +96,7 @@ impl CopilotCodeVerification {
|
||||
.items_center()
|
||||
.child(Headline::new("Use Github Copilot in Zed.").size(HeadlineSize::Large))
|
||||
.child(
|
||||
Label::new("Using Copilot requres an active subscription on Github.")
|
||||
Label::new("Using Copilot requires an active subscription on Github.")
|
||||
.color(Color::Muted),
|
||||
)
|
||||
.child(Self::render_device_code(data, cx))
|
||||
@ -139,7 +139,7 @@ impl CopilotCodeVerification {
|
||||
"You can enable Copilot by connecting your existing license once you have subscribed or renewed your subscription.",
|
||||
).color(Color::Warning))
|
||||
.child(
|
||||
Button::new("copilot-subscribe-button", "Subscibe on Github")
|
||||
Button::new("copilot-subscribe-button", "Subscribe on Github")
|
||||
.full_width()
|
||||
.on_click(|_, cx| cx.open_url(COPILOT_SIGN_UP_URL)),
|
||||
)
|
||||
|
@ -8736,7 +8736,7 @@ impl Editor {
|
||||
) {
|
||||
match event {
|
||||
multi_buffer::Event::Edited {
|
||||
sigleton_buffer_edited,
|
||||
singleton_buffer_edited,
|
||||
} => {
|
||||
self.refresh_active_diagnostics(cx);
|
||||
self.refresh_code_actions(cx);
|
||||
@ -8746,7 +8746,7 @@ impl Editor {
|
||||
cx.emit(EditorEvent::BufferEdited);
|
||||
cx.emit(SearchEvent::MatchesInvalidated);
|
||||
|
||||
if *sigleton_buffer_edited {
|
||||
if *singleton_buffer_edited {
|
||||
if let Some(project) = &self.project {
|
||||
let project = project.read(cx);
|
||||
let languages_affected = multibuffer
|
||||
|
@ -925,14 +925,14 @@ async fn fetch_and_update_hints(
|
||||
log::trace!("Fetched hints: {new_hints:?}");
|
||||
|
||||
let background_task_buffer_snapshot = buffer_snapshot.clone();
|
||||
let backround_fetch_range = fetch_range.clone();
|
||||
let background_fetch_range = fetch_range.clone();
|
||||
let new_update = cx
|
||||
.background_executor()
|
||||
.spawn(async move {
|
||||
calculate_hint_updates(
|
||||
query.excerpt_id,
|
||||
invalidate,
|
||||
backround_fetch_range,
|
||||
background_fetch_range,
|
||||
new_hints,
|
||||
&background_task_buffer_snapshot,
|
||||
cached_excerpt_hints,
|
||||
@ -1449,7 +1449,7 @@ pub mod tests {
|
||||
assert_eq!(
|
||||
editor.inlay_hint_cache().version,
|
||||
edits_made,
|
||||
"Cache version should udpate once after the work task is done"
|
||||
"Cache version should update once after the work task is done"
|
||||
);
|
||||
});
|
||||
}
|
||||
@ -1599,7 +1599,7 @@ pub mod tests {
|
||||
assert_eq!(
|
||||
expected_hints,
|
||||
cached_hint_labels(editor),
|
||||
"Markdown editor should have a separate verison, repeating Rust editor rules"
|
||||
"Markdown editor should have a separate version, repeating Rust editor rules"
|
||||
);
|
||||
assert_eq!(expected_hints, visible_hint_labels(editor, cx));
|
||||
assert_eq!(editor.inlay_hint_cache().version, 1);
|
||||
@ -2612,7 +2612,7 @@ pub mod tests {
|
||||
"When scroll is at the edge of a multibuffer, its visible excerpts only should be queried for inlay hints"
|
||||
);
|
||||
assert_eq!(expected_hints, visible_hint_labels(editor, cx));
|
||||
assert_eq!(editor.inlay_hint_cache().version, expected_hints.len(), "Every visible excerpt hints should bump the verison");
|
||||
assert_eq!(editor.inlay_hint_cache().version, expected_hints.len(), "Every visible excerpt hints should bump the version");
|
||||
});
|
||||
|
||||
_ = editor.update(cx, |editor, cx| {
|
||||
@ -2728,7 +2728,7 @@ pub mod tests {
|
||||
expected_hints,
|
||||
cached_hint_labels(editor),
|
||||
"After multibuffer edit, editor gets scolled back to the last selection; \
|
||||
all hints should be invalidated and requeried for all of its visible excerpts"
|
||||
all hints should be invalidated and required for all of its visible excerpts"
|
||||
);
|
||||
assert_eq!(expected_hints, visible_hint_labels(editor, cx));
|
||||
|
||||
|
@ -29,7 +29,7 @@ pub trait GitRepository: Send {
|
||||
fn branch_name(&self) -> Option<String>;
|
||||
|
||||
/// Get the statuses of all of the files in the index that start with the given
|
||||
/// path and have changes with resepect to the HEAD commit. This is fast because
|
||||
/// path and have changes with respect to the HEAD commit. This is fast because
|
||||
/// the index stores hashes of trees, so that unchanged directories can be skipped.
|
||||
fn staged_statuses(&self, path_prefix: &Path) -> TreeMap<RepoPath, GitFileStatus>;
|
||||
|
||||
|
@ -149,7 +149,7 @@ impl BackgroundExecutor {
|
||||
Task::Spawned(task)
|
||||
}
|
||||
|
||||
/// Used by the test harness to run an async test in a syncronous fashion.
|
||||
/// Used by the test harness to run an async test in a synchronous fashion.
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
#[track_caller]
|
||||
pub fn block_test<R>(&self, future: impl Future<Output = R>) -> R {
|
||||
@ -276,7 +276,7 @@ impl BackgroundExecutor {
|
||||
|
||||
/// Returns a task that will complete after the given duration.
|
||||
/// Depending on other concurrent tasks the elapsed duration may be longer
|
||||
/// than reqested.
|
||||
/// than requested.
|
||||
pub fn timer(&self, duration: Duration) -> Task<()> {
|
||||
let (runnable, task) = async_task::spawn(async move {}, {
|
||||
let dispatcher = self.dispatcher.clone();
|
||||
|
@ -445,7 +445,7 @@ mod tests {
|
||||
KeyMatch::Some(vec![Box::new(Dollar)])
|
||||
);
|
||||
|
||||
// handle Brazillian quote (quote key then space key)
|
||||
// handle Brazilian quote (quote key then space key)
|
||||
assert_eq!(
|
||||
matcher.match_keystroke(
|
||||
&Keystroke::parse("space->\"").unwrap(),
|
||||
@ -454,7 +454,7 @@ mod tests {
|
||||
KeyMatch::Some(vec![Box::new(Quote)])
|
||||
);
|
||||
|
||||
// handle ctrl+` on a brazillian keyboard
|
||||
// handle ctrl+` on a brazilian keyboard
|
||||
assert_eq!(
|
||||
matcher.match_keystroke(&Keystroke::parse("ctrl-->`").unwrap(), &[context_a.clone()]),
|
||||
KeyMatch::Some(vec![Box::new(Backtick)])
|
||||
|
@ -19,7 +19,7 @@ impl Keystroke {
|
||||
// the ime_key or the key. On some non-US keyboards keys we use in our
|
||||
// bindings are behind option (for example `$` is typed `alt-ç` on a Czech keyboard),
|
||||
// and on some keyboards the IME handler converts a sequence of keys into a
|
||||
// specific character (for example `"` is typed as `" space` on a brazillian keyboard).
|
||||
// specific character (for example `"` is typed as `" space` on a brazilian keyboard).
|
||||
pub fn match_candidates(&self) -> SmallVec<[Keystroke; 2]> {
|
||||
let mut possibilities = SmallVec::new();
|
||||
match self.ime_key.as_ref() {
|
||||
|
@ -10,7 +10,7 @@ mod open_type;
|
||||
mod platform;
|
||||
mod text_system;
|
||||
mod window;
|
||||
mod window_appearence;
|
||||
mod window_appearance;
|
||||
|
||||
use crate::{px, size, GlobalPixels, Pixels, Size};
|
||||
use cocoa::{
|
||||
|
@ -42,7 +42,7 @@ pub struct Style {
|
||||
#[refineable]
|
||||
pub inset: Edges<Length>,
|
||||
|
||||
// Size properies
|
||||
// Size properties
|
||||
/// Sets the initial size of the item
|
||||
#[refineable]
|
||||
pub size: Size<Length>,
|
||||
@ -79,7 +79,7 @@ pub struct Style {
|
||||
#[refineable]
|
||||
pub gap: Size<DefiniteLength>,
|
||||
|
||||
// Flexbox properies
|
||||
// Flexbox properties
|
||||
/// Which direction does the main axis flow in?
|
||||
pub flex_direction: FlexDirection,
|
||||
/// Should elements wrap, or stay in a single line?
|
||||
@ -502,7 +502,7 @@ impl Default for Style {
|
||||
max_size: Size::auto(),
|
||||
aspect_ratio: None,
|
||||
gap: Size::default(),
|
||||
// Aligment
|
||||
// Alignment
|
||||
align_items: None,
|
||||
align_self: None,
|
||||
align_content: None,
|
||||
|
@ -2130,7 +2130,7 @@ impl<'a> WindowContext<'a> {
|
||||
.unwrap();
|
||||
|
||||
// Actual: Option<AnyElement> <- View
|
||||
// Requested: () <- AnyElemet
|
||||
// Requested: () <- AnyElement
|
||||
let state = state_box
|
||||
.take()
|
||||
.expect("element state is already on the stack");
|
||||
|
@ -53,7 +53,7 @@ pub fn style_helpers(input: TokenStream) -> TokenStream {
|
||||
/// variety of scenarios and interleavings just by changing the seed.
|
||||
///
|
||||
/// #[gpui::test] also takes three different arguments:
|
||||
/// - `#[gpui::test(interations=10)]` will run the test ten times with a different initial SEED.
|
||||
/// - `#[gpui::test(iterations=10)]` will run the test ten times with a different initial SEED.
|
||||
/// - `#[gpui::test(retries=3)]` will run the test up to four times if it fails to try and make it pass.
|
||||
/// - `#[gpui::test(on_failure="crate::test::report_failure")]` will call the specified function after the
|
||||
/// tests fail so that you can write out more detail about the failure.
|
||||
|
@ -275,7 +275,7 @@ async fn test_normalize_whitespace(cx: &mut gpui::TestAppContext) {
|
||||
let version_before_format = format_diff.base_version.clone();
|
||||
buffer.apply_diff(format_diff, cx);
|
||||
|
||||
// The outcome depends on the order of concurrent taks.
|
||||
// The outcome depends on the order of concurrent tasks.
|
||||
//
|
||||
// If the edit occurred while searching for trailing whitespace ranges,
|
||||
// then the trailing whitespace region touched by the edit is left intact.
|
||||
|
@ -839,7 +839,7 @@ impl LanguageServer {
|
||||
futures::select! {
|
||||
response = rx.fuse() => {
|
||||
let elapsed = started.elapsed();
|
||||
log::trace!("Took {elapsed:?} to recieve response to {method:?} id {id}");
|
||||
log::trace!("Took {elapsed:?} to receive response to {method:?} id {id}");
|
||||
response?
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ pub enum Event {
|
||||
ids: Vec<ExcerptId>,
|
||||
},
|
||||
Edited {
|
||||
sigleton_buffer_edited: bool,
|
||||
singleton_buffer_edited: bool,
|
||||
},
|
||||
TransactionUndone {
|
||||
transaction_id: TransactionId,
|
||||
@ -1112,7 +1112,7 @@ impl MultiBuffer {
|
||||
new: edit_start..edit_end,
|
||||
}]);
|
||||
cx.emit(Event::Edited {
|
||||
sigleton_buffer_edited: false,
|
||||
singleton_buffer_edited: false,
|
||||
});
|
||||
cx.emit(Event::ExcerptsAdded {
|
||||
buffer,
|
||||
@ -1138,7 +1138,7 @@ impl MultiBuffer {
|
||||
new: 0..0,
|
||||
}]);
|
||||
cx.emit(Event::Edited {
|
||||
sigleton_buffer_edited: false,
|
||||
singleton_buffer_edited: false,
|
||||
});
|
||||
cx.emit(Event::ExcerptsRemoved { ids });
|
||||
cx.notify();
|
||||
@ -1348,7 +1348,7 @@ impl MultiBuffer {
|
||||
|
||||
self.subscriptions.publish_mut(edits);
|
||||
cx.emit(Event::Edited {
|
||||
sigleton_buffer_edited: false,
|
||||
singleton_buffer_edited: false,
|
||||
});
|
||||
cx.emit(Event::ExcerptsRemoved { ids });
|
||||
cx.notify();
|
||||
@ -1411,7 +1411,7 @@ impl MultiBuffer {
|
||||
) {
|
||||
cx.emit(match event {
|
||||
language::Event::Edited => Event::Edited {
|
||||
sigleton_buffer_edited: true,
|
||||
singleton_buffer_edited: true,
|
||||
},
|
||||
language::Event::DirtyChanged => Event::DirtyChanged,
|
||||
language::Event::Saved => Event::Saved,
|
||||
@ -4280,13 +4280,13 @@ mod tests {
|
||||
events.read().as_slice(),
|
||||
&[
|
||||
Event::Edited {
|
||||
sigleton_buffer_edited: false
|
||||
singleton_buffer_edited: false
|
||||
},
|
||||
Event::Edited {
|
||||
sigleton_buffer_edited: false
|
||||
singleton_buffer_edited: false
|
||||
},
|
||||
Event::Edited {
|
||||
sigleton_buffer_edited: false
|
||||
singleton_buffer_edited: false
|
||||
}
|
||||
]
|
||||
);
|
||||
|
@ -2253,7 +2253,7 @@ impl LspCommand for InlayHints {
|
||||
language_server_for_buffer(&project, &buffer, server_id, &mut cx)?;
|
||||
// `typescript-language-server` adds padding to the left for type hints, turning
|
||||
// `const foo: boolean` into `const foo : boolean` which looks odd.
|
||||
// `rust-analyzer` does not have the padding for this case, and we have to accomodate both.
|
||||
// `rust-analyzer` does not have the padding for this case, and we have to accommodate both.
|
||||
//
|
||||
// We could trim the whole string, but being pessimistic on par with the situation above,
|
||||
// there might be a hint with multiple whitespaces at the end(s) which we need to display properly.
|
||||
|
@ -5578,7 +5578,7 @@ impl Project {
|
||||
// 3. We run a scan over all the candidate buffers on multiple background threads.
|
||||
// We cannot assume that there will even be a match - while at least one match
|
||||
// is guaranteed for files obtained from FS, the buffers we got from memory (unsaved files/unnamed buffers) might not have a match at all.
|
||||
// There is also an auxilliary background thread responsible for result gathering.
|
||||
// There is also an auxiliary background thread responsible for result gathering.
|
||||
// This is where the sorted list of buffers comes into play to maintain sorted order; Whenever this background thread receives a notification (buffer has/doesn't have matches),
|
||||
// it keeps it around. It reports matches in sorted order, though it accepts them in unsorted order as well.
|
||||
// As soon as the match info on next position in sorted order becomes available, it reports it (if it's a match) or skips to the next
|
||||
@ -8550,7 +8550,7 @@ fn glob_literal_prefix<'a>(glob: &'a str) -> &'a str {
|
||||
break;
|
||||
} else {
|
||||
if i > 0 {
|
||||
// Acount for separator prior to this part
|
||||
// Account for separator prior to this part
|
||||
literal_end += path::MAIN_SEPARATOR.len_utf8();
|
||||
}
|
||||
literal_end += part.len();
|
||||
|
@ -9,7 +9,7 @@ use std::sync::Arc;
|
||||
pub struct ProjectSettings {
|
||||
/// Configuration for language servers.
|
||||
///
|
||||
/// The following settings can be overriden for specific language servers:
|
||||
/// The following settings can be overridden for specific language servers:
|
||||
/// - initialization_options
|
||||
/// To override settings for a language, add an entry for that language server's
|
||||
/// name to the lsp value.
|
||||
|
@ -44,7 +44,7 @@ impl FileAssociations {
|
||||
pub fn get_icon(path: &Path, cx: &AppContext) -> Option<Arc<str>> {
|
||||
let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?;
|
||||
|
||||
// FIXME: Associate a type with the languages and have the file's langauge
|
||||
// FIXME: Associate a type with the languages and have the file's language
|
||||
// override these associations
|
||||
maybe!({
|
||||
let suffix = path.icon_suffix()?;
|
||||
|
@ -32,7 +32,7 @@ impl RecentProjects {
|
||||
fn new(delegate: RecentProjectsDelegate, rem_width: f32, cx: &mut ViewContext<Self>) -> Self {
|
||||
let picker = cx.new_view(|cx| Picker::new(delegate, cx));
|
||||
let _subscription = cx.subscribe(&picker, |_, _, _, cx| cx.emit(DismissEvent));
|
||||
// We do not want to block the UI on a potentially lenghty call to DB, so we're gonna swap
|
||||
// We do not want to block the UI on a potentially lengthy call to DB, so we're gonna swap
|
||||
// out workspace locations once the future runs to completion.
|
||||
cx.spawn(|this, mut cx| async move {
|
||||
let workspaces = WORKSPACE_DB
|
||||
|
@ -141,7 +141,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let refinement_refine_assigments: Vec<TokenStream2> = fields
|
||||
let refinement_refine_assignments: Vec<TokenStream2> = fields
|
||||
.iter()
|
||||
.map(|field| {
|
||||
let name = &field.ident;
|
||||
@ -161,7 +161,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let refinement_refined_assigments: Vec<TokenStream2> = fields
|
||||
let refinement_refined_assignments: Vec<TokenStream2> = fields
|
||||
.iter()
|
||||
.map(|field| {
|
||||
let name = &field.ident;
|
||||
@ -181,7 +181,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let from_refinement_assigments: Vec<TokenStream2> = fields
|
||||
let from_refinement_assignments: Vec<TokenStream2> = fields
|
||||
.iter()
|
||||
.map(|field| {
|
||||
let name = &field.ident;
|
||||
@ -272,11 +272,11 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
||||
type Refinement = #refinement_ident #ty_generics;
|
||||
|
||||
fn refine(&mut self, refinement: &Self::Refinement) {
|
||||
#( #refinement_refine_assigments )*
|
||||
#( #refinement_refine_assignments )*
|
||||
}
|
||||
|
||||
fn refined(mut self, refinement: Self::Refinement) -> Self {
|
||||
#( #refinement_refined_assigments )*
|
||||
#( #refinement_refined_assignments )*
|
||||
self
|
||||
}
|
||||
}
|
||||
@ -286,7 +286,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
||||
{
|
||||
fn from(value: #refinement_ident #ty_generics) -> Self {
|
||||
Self {
|
||||
#( #from_refinement_assigments )*
|
||||
#( #from_refinement_assignments )*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2579,7 +2579,7 @@ pub mod tests {
|
||||
);
|
||||
assert!(
|
||||
search_view_2.query_editor.focus_handle(cx).is_focused(cx),
|
||||
"Focus should be moved into query editor fo the new window"
|
||||
"Focus should be moved into query editor of the new window"
|
||||
);
|
||||
});
|
||||
}).unwrap();
|
||||
|
@ -10,7 +10,7 @@ nDCG@k:
|
||||
- "The relevance of result is represented by a score (also known as a 'grade') that is assigned to the search query. The scores of these results are then discounted based on their position in the search results -- did they get recommended first or last?"
|
||||
|
||||
MRR@k:
|
||||
- "Mean reciprocal rank quantifies the rank of the first relevant item found in teh recommendation list."
|
||||
- "Mean reciprocal rank quantifies the rank of the first relevant item found in the recommendation list."
|
||||
|
||||
MAP@k:
|
||||
- "Mean average precision averages the precision@k metric at each relevant item position in the recommendation list.
|
||||
|
@ -76,7 +76,7 @@ pub struct CodeContextRetriever {
|
||||
|
||||
// Every match has an item, this represents the fundamental treesitter symbol and anchors the search
|
||||
// Every match has one or more 'name' captures. These indicate the display range of the item for deduplication.
|
||||
// If there are preceeding comments, we track this with a context capture
|
||||
// If there are preceding comments, we track this with a context capture
|
||||
// If there is a piece that should be collapsed in hierarchical queries, we capture it with a collapse capture
|
||||
// If there is a piece that should be kept inside a collapsed node, we capture it with a keep capture
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -110,7 +110,7 @@ async fn test_semantic_index(cx: &mut TestAppContext) {
|
||||
cx,
|
||||
);
|
||||
|
||||
// Test Include Files Functonality
|
||||
// Test Include Files Functionality
|
||||
let include_files = vec![PathMatcher::new("*.rs").unwrap()];
|
||||
let exclude_files = vec![PathMatcher::new("*.rs").unwrap()];
|
||||
let rust_only_search_results = semantic_index
|
||||
@ -576,7 +576,7 @@ async fn test_code_context_retrieval_lua() {
|
||||
setmetatable(classdef, { __index = baseclass })
|
||||
-- All class instances have a reference to the class object.
|
||||
classdef.class = classdef
|
||||
--- Recursivly allocates the inheritance tree of the instance.
|
||||
--- Recursively allocates the inheritance tree of the instance.
|
||||
-- @param mastertable The 'root' of the inheritance tree.
|
||||
-- @return Returns the instance with the allocated inheritance tree.
|
||||
function classdef.alloc(mastertable)
|
||||
@ -607,7 +607,7 @@ async fn test_code_context_retrieval_lua() {
|
||||
setmetatable(classdef, { __index = baseclass })
|
||||
-- All class instances have a reference to the class object.
|
||||
classdef.class = classdef
|
||||
--- Recursivly allocates the inheritance tree of the instance.
|
||||
--- Recursively allocates the inheritance tree of the instance.
|
||||
-- @param mastertable The 'root' of the inheritance tree.
|
||||
-- @return Returns the instance with the allocated inheritance tree.
|
||||
function classdef.alloc(mastertable)
|
||||
@ -617,7 +617,7 @@ async fn test_code_context_retrieval_lua() {
|
||||
end"#.unindent(),
|
||||
114),
|
||||
(r#"
|
||||
--- Recursivly allocates the inheritance tree of the instance.
|
||||
--- Recursively allocates the inheritance tree of the instance.
|
||||
-- @param mastertable The 'root' of the inheritance tree.
|
||||
-- @return Returns the instance with the allocated inheritance tree.
|
||||
function classdef.alloc(mastertable)
|
||||
|
@ -191,7 +191,7 @@ mod test {
|
||||
fn migrations_dont_rerun() {
|
||||
let connection = Connection::open_memory(Some("migrations_dont_rerun"));
|
||||
|
||||
// Create migration which clears a tabl
|
||||
// Create migration which clears a table
|
||||
|
||||
// Manually create the table for that migration with a row
|
||||
connection
|
||||
|
@ -65,7 +65,7 @@ impl Render for TextStory {
|
||||
))
|
||||
)
|
||||
.usage(indoc! {r##"
|
||||
// NOTE: When rendering text in a horizonal flex container,
|
||||
// NOTE: When rendering text in a horizontal flex container,
|
||||
// Taffy will not pass width constraints down from the parent.
|
||||
// To fix this, render text in a parent with overflow: hidden
|
||||
|
||||
@ -149,7 +149,7 @@ impl Render for TextStory {
|
||||
// "Meanwhile, the lazy dog decided it was time for a change. ",
|
||||
// "He started daily workout routines, ate healthier and became the fastest dog in town.",
|
||||
// ))))
|
||||
// // NOTE: When rendering text in a horizonal flex container,
|
||||
// // NOTE: When rendering text in a horizontal flex container,
|
||||
// // Taffy will not pass width constraints down from the parent.
|
||||
// // To fix this, render text in a parent with overflow: hidden
|
||||
// .child(div().h_5())
|
||||
|
@ -674,9 +674,9 @@ impl Render for TerminalView {
|
||||
self.can_navigate_to_selected_word,
|
||||
)),
|
||||
)
|
||||
.children(self.context_menu.as_ref().map(|(menu, positon, _)| {
|
||||
.children(self.context_menu.as_ref().map(|(menu, position, _)| {
|
||||
overlay()
|
||||
.position(*positon)
|
||||
.position(*position)
|
||||
.anchor(gpui::AnchorCorner::TopLeft)
|
||||
.child(menu.clone())
|
||||
}))
|
||||
|
@ -127,7 +127,7 @@ impl SyntaxTheme {
|
||||
}
|
||||
}
|
||||
|
||||
// TOOD: Get this working with `#[cfg(test)]`. Why isn't it?
|
||||
// TODO: Get this working with `#[cfg(test)]`. Why isn't it?
|
||||
pub fn new_test(colors: impl IntoIterator<Item = (&'static str, Hsla)>) -> Self {
|
||||
SyntaxTheme {
|
||||
highlights: colors
|
||||
|
@ -188,7 +188,7 @@ fn main() -> Result<()> {
|
||||
|
||||
let zed1_themes_path = PathBuf::from_str("assets/themes")?;
|
||||
|
||||
let zed1_theme_familes = [
|
||||
let zed1_theme_families = [
|
||||
"Andromeda",
|
||||
"Atelier",
|
||||
"Ayu",
|
||||
@ -207,7 +207,7 @@ fn main() -> Result<()> {
|
||||
);
|
||||
|
||||
let mut zed1_themes_by_family: IndexMap<String, Vec<UserTheme>> = IndexMap::from_iter(
|
||||
zed1_theme_familes
|
||||
zed1_theme_families
|
||||
.into_iter()
|
||||
.map(|family| (family.to_string(), Vec::new())),
|
||||
);
|
||||
|
@ -111,7 +111,7 @@ pub enum ButtonStyle {
|
||||
#[default]
|
||||
Subtle,
|
||||
|
||||
/// Used for buttons that only change forground color on hover and active states.
|
||||
/// Used for buttons that only change foreground color on hover and active states.
|
||||
///
|
||||
/// TODO: Better docs for this.
|
||||
Transparent,
|
||||
|
@ -12,7 +12,7 @@ use smallvec::SmallVec;
|
||||
/// user's mouse.)
|
||||
///
|
||||
/// Example: A "new" menu with options like "new file", "new folder", etc,
|
||||
/// Linear's "Display" menu, a profile menu that appers when you click your avatar.
|
||||
/// Linear's "Display" menu, a profile menu that appears when you click your avatar.
|
||||
///
|
||||
/// Related elements:
|
||||
///
|
||||
|
@ -85,7 +85,7 @@ impl LayerIndex {
|
||||
}
|
||||
}
|
||||
|
||||
/// An appropriate z-index for the given layer based on its intended useage.
|
||||
/// An appropriate z-index for the given layer based on its intended usage.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum ElementIndex {
|
||||
Effect,
|
||||
|
@ -342,7 +342,7 @@ impl PickerDelegate for BranchListDelegate {
|
||||
}
|
||||
let status = repo.change_branch(¤t_pick);
|
||||
if status.is_err() {
|
||||
this.delegate.display_error_toast(format!("Failed to chec branch '{current_pick}', check for conflicts or unstashed files"), cx);
|
||||
this.delegate.display_error_toast(format!("Failed to check branch '{current_pick}', check for conflicts or unstashed files"), cx);
|
||||
status?;
|
||||
}
|
||||
this.cancel(&Default::default(), cx);
|
||||
|
@ -152,7 +152,7 @@ pub(crate) fn repeat(cx: &mut WindowContext, from_insert_mode: bool) {
|
||||
|
||||
let mut count = Vim::read(cx).workspace_state.recorded_count.unwrap_or(1);
|
||||
|
||||
// if we came from insert mode we're just doing repititions 2 onwards.
|
||||
// if we came from insert mode we're just doing repetitions 2 onwards.
|
||||
if from_insert_mode {
|
||||
count -= 1;
|
||||
new_actions[0] = actions[0].clone();
|
||||
|
@ -278,7 +278,7 @@ fn parse_replace_all(query: &str) -> Replacement {
|
||||
return Replacement::default();
|
||||
}
|
||||
|
||||
let Some(delimeter) = chars.next() else {
|
||||
let Some(delimiter) = chars.next() else {
|
||||
return Replacement::default();
|
||||
};
|
||||
|
||||
@ -301,13 +301,13 @@ fn parse_replace_all(query: &str) -> Replacement {
|
||||
buffer.push('$')
|
||||
// unescape escaped parens
|
||||
} else if phase == 0 && c == '(' || c == ')' {
|
||||
} else if c != delimeter {
|
||||
} else if c != delimiter {
|
||||
buffer.push('\\')
|
||||
}
|
||||
buffer.push(c)
|
||||
} else if c == '\\' {
|
||||
escaped = true;
|
||||
} else if c == delimeter {
|
||||
} else if c == delimiter {
|
||||
if phase == 0 {
|
||||
buffer = &mut replacement;
|
||||
phase = 1;
|
||||
|
@ -359,7 +359,7 @@ impl NeovimConnection {
|
||||
// to add one to the end in visual mode.
|
||||
match mode {
|
||||
Some(Mode::VisualBlock) if selection_row != cursor_row => {
|
||||
// in zed we fake a block selecrtion by using multiple cursors (one per line)
|
||||
// in zed we fake a block selection by using multiple cursors (one per line)
|
||||
// this code emulates that.
|
||||
// to deal with casees where the selection is not perfectly rectangular we extract
|
||||
// the content of the selection via the "a register to get the shape correctly.
|
||||
|
@ -201,14 +201,14 @@ pub fn visual_block_motion(
|
||||
let mut row = tail.row();
|
||||
|
||||
loop {
|
||||
let layed_out_line = map.layout_row(row, &text_layout_details);
|
||||
let laid_out_line = map.layout_row(row, &text_layout_details);
|
||||
let start = DisplayPoint::new(
|
||||
row,
|
||||
layed_out_line.closest_index_for_x(positions.start) as u32,
|
||||
laid_out_line.closest_index_for_x(positions.start) as u32,
|
||||
);
|
||||
let mut end = DisplayPoint::new(
|
||||
row,
|
||||
layed_out_line.closest_index_for_x(positions.end) as u32,
|
||||
laid_out_line.closest_index_for_x(positions.end) as u32,
|
||||
);
|
||||
if end <= start {
|
||||
if start.column() == map.line_len(start.row()) {
|
||||
@ -218,7 +218,7 @@ pub fn visual_block_motion(
|
||||
}
|
||||
}
|
||||
|
||||
if positions.start <= layed_out_line.width {
|
||||
if positions.start <= laid_out_line.width {
|
||||
let selection = Selection {
|
||||
id: s.new_selection_id(),
|
||||
start: start.to_point(map),
|
||||
|
@ -4,7 +4,7 @@ use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::Settings;
|
||||
|
||||
/// Base key bindings scheme. Base keymaps can be overriden with user keymaps.
|
||||
/// Base key bindings scheme. Base keymaps can be overridden with user keymaps.
|
||||
///
|
||||
/// Default: VSCode
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Default)]
|
||||
|
@ -1485,7 +1485,7 @@ impl Pane {
|
||||
.child(
|
||||
div()
|
||||
.min_w_6()
|
||||
// HACK: This empty child is currently necessary to force the drop traget to appear
|
||||
// HACK: This empty child is currently necessary to force the drop target to appear
|
||||
// despite us setting a min width above.
|
||||
.child("")
|
||||
.h_full()
|
||||
|
@ -2617,7 +2617,7 @@ impl Workspace {
|
||||
|
||||
// If the item belongs to a particular project, then it should
|
||||
// only be included if this project is shared, and the follower
|
||||
// is in thie project.
|
||||
// is in the project.
|
||||
//
|
||||
// Some items, like channel notes, do not belong to a particular
|
||||
// project, so they should be included regardless of whether the
|
||||
|
@ -36,7 +36,7 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil
|
||||
Unfortunately, unselecting `repo` scope and selecting every its inner scope instead does not allow the token users to read from private repositories
|
||||
- (not applicable) Fine-grained Tokens, at the moment of writing, did not allow any kind of access of non-owned private repos
|
||||
- Keep the token in the browser tab/editor for the next two steps
|
||||
1. (Optional but reccomended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||
1. (Optional but recommended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||
1. Ensure the Zed.dev website is checked out in a sibling directory and install it's dependencies:
|
||||
```
|
||||
cd ..
|
||||
|
@ -4,7 +4,7 @@ This doc is a work in progress!
|
||||
|
||||
## Defining syntax highlighting rules
|
||||
|
||||
We use tree-sitter queries to match certian properties to highlight.
|
||||
We use tree-sitter queries to match certain properties to highlight.
|
||||
|
||||
### Simple Example:
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Folder-specific settings are used to override Zed's global settings for files within a specific directory in the project panel. To get started, create a `.zed` subdirectory and add a `settings.json` within it. It should be noted that folder-specific settings don't need to live only a project's root, but can be defined at multiple levels in the project hierarchy. In setups like this, Zed will find the configuration nearest to the file you are working in and apply those settings to it. In most cases, this level of flexibility won't be needed and a single configuration for all files in a project is all that is required; the `Zed > Settings > Open Local Settings` menu action is built for this case. Running this action will look for a `.zed/settings.json` file at the root of the first top-level directory in your project panel. If it does not exist, it will create it.
|
||||
|
||||
The following global settings can be overriden with a folder-specific configuration:
|
||||
The following global settings can be overridden with a folder-specific configuration:
|
||||
|
||||
- `copilot`
|
||||
- `enable_language_server`
|
||||
|
@ -8,7 +8,7 @@ Zed uses the [Language Server Protocol](https://microsoft.github.io/language-ser
|
||||
|
||||
### Defining syntax highlighting rules
|
||||
|
||||
We use tree-sitter queries to match certian properties to highlight.
|
||||
We use tree-sitter queries to match certain properties to highlight.
|
||||
|
||||
#### Simple Example:
|
||||
|
||||
|
@ -39,7 +39,7 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil
|
||||
Unfortunately, unselecting `repo` scope and selecting every its inner scope instead does not allow the token users to read from private repositories
|
||||
- (not applicable) Fine-grained Tokens, at the moment of writing, did not allow any kind of access of non-owned private repos
|
||||
- Keep the token in the browser tab/editor for the next two steps
|
||||
1. (Optional but reccomended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||
1. (Optional but recommended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||
1. Ensure the Zed.dev website is checked out in a sibling directory and install its dependencies:
|
||||
```
|
||||
cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user