mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Fix typos
This commit is contained in:
parent
46d2cbaa4c
commit
7c60f636d5
41 changed files with 69 additions and 72 deletions
|
@ -516,7 +516,7 @@
|
|||
"terminal::SendText",
|
||||
"\u0001"
|
||||
],
|
||||
// Terminal.app compatability
|
||||
// Terminal.app compatibility
|
||||
"alt-left": [
|
||||
"terminal::SendText",
|
||||
"\u001bb"
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
// copy to the system clipboard.
|
||||
"copy_on_select": false,
|
||||
// Any key-value pairs added to this list will be added to the terminal's
|
||||
// enviroment. Use `:` to seperate multiple values.
|
||||
// environment. Use `:` to separate multiple values.
|
||||
"env": {
|
||||
// "KEY": "value1:value2"
|
||||
},
|
||||
|
|
|
@ -159,10 +159,7 @@ impl Bundle {
|
|||
fn path(&self) -> &Path {
|
||||
match self {
|
||||
Self::App { app_bundle, .. } => app_bundle,
|
||||
Self::LocalPath {
|
||||
executable: excutable,
|
||||
..
|
||||
} => excutable,
|
||||
Self::LocalPath { executable, .. } => executable,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ impl CollabTitlebarItem {
|
|||
Stack::new()
|
||||
.with_child(
|
||||
MouseEventHandler::<ShareUnshare, Self>::new(0, cx, |state, _| {
|
||||
//TODO: Ensure this button has consistant width for both text variations
|
||||
//TODO: Ensure this button has consistent width for both text variations
|
||||
let style = titlebar.share_button.style_for(state, false);
|
||||
Label::new(label, style.text.clone())
|
||||
.contained()
|
||||
|
|
|
@ -375,7 +375,7 @@ impl Copilot {
|
|||
server
|
||||
.on_notification::<LogMessage, _>(|params, _cx| {
|
||||
match params.level {
|
||||
// Copilot is pretty agressive about logging
|
||||
// Copilot is pretty aggressive about logging
|
||||
0 => debug!("copilot: {}", params.message),
|
||||
1 => debug!("copilot: {}", params.message),
|
||||
_ => error!("copilot: {}", params.message),
|
||||
|
|
|
@ -475,7 +475,7 @@ impl DisplaySnapshot {
|
|||
})
|
||||
}
|
||||
|
||||
/// Returns an iterator of the start positions of the occurances of `target` in the `self` after `from`
|
||||
/// Returns an iterator of the start positions of the occurrences of `target` in the `self` after `from`
|
||||
/// Stops if `condition` returns false for any of the character position pairs observed.
|
||||
pub fn find_while<'a>(
|
||||
&'a self,
|
||||
|
@ -486,7 +486,7 @@ impl DisplaySnapshot {
|
|||
Self::find_internal(self.chars_at(from), target.chars().collect(), condition)
|
||||
}
|
||||
|
||||
/// Returns an iterator of the end positions of the occurances of `target` in the `self` before `from`
|
||||
/// Returns an iterator of the end positions of the occurrences of `target` in the `self` before `from`
|
||||
/// Stops if `condition` returns false for any of the character position pairs observed.
|
||||
pub fn reverse_find_while<'a>(
|
||||
&'a self,
|
||||
|
|
|
@ -2539,7 +2539,7 @@ impl Editor {
|
|||
.read(cx)
|
||||
.text_anchor_for_position(position.clone(), cx)?;
|
||||
|
||||
// OnTypeFormatting retuns a list of edits, no need to pass them between Zed instances,
|
||||
// OnTypeFormatting returns a list of edits, no need to pass them between Zed instances,
|
||||
// hence we do LSP request & edit on host side only — add formats to host's history.
|
||||
let push_to_lsp_host_history = true;
|
||||
// If this is not the host, append its history with new edits.
|
||||
|
@ -7913,13 +7913,13 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend
|
|||
}
|
||||
|
||||
pub fn highlight_diagnostic_message(
|
||||
inital_highlights: Vec<usize>,
|
||||
initial_highlights: Vec<usize>,
|
||||
message: &str,
|
||||
) -> (String, Vec<usize>) {
|
||||
let mut message_without_backticks = String::new();
|
||||
let mut prev_offset = 0;
|
||||
let mut inside_block = false;
|
||||
let mut highlights = inital_highlights;
|
||||
let mut highlights = initial_highlights;
|
||||
for (match_ix, (offset, _)) in message
|
||||
.match_indices('`')
|
||||
.chain([(message.len(), "")])
|
||||
|
|
|
@ -4321,7 +4321,7 @@ async fn test_document_format_during_save(cx: &mut gpui::TestAppContext) {
|
|||
);
|
||||
assert!(!cx.read(|cx| editor.is_dirty(cx)));
|
||||
|
||||
// Set rust language override and assert overriden tabsize is sent to language server
|
||||
// Set rust language override and assert overridden tabsize is sent to language server
|
||||
update_test_settings(cx, |settings| {
|
||||
settings.languages.insert(
|
||||
"Rust".into(),
|
||||
|
@ -4435,7 +4435,7 @@ async fn test_range_format_during_save(cx: &mut gpui::TestAppContext) {
|
|||
);
|
||||
assert!(!cx.read(|cx| editor.is_dirty(cx)));
|
||||
|
||||
// Set rust language override and assert overriden tabsize is sent to language server
|
||||
// Set rust language override and assert overridden tabsize is sent to language server
|
||||
update_test_settings(cx, |settings| {
|
||||
settings.languages.insert(
|
||||
"Rust".into(),
|
||||
|
@ -4776,7 +4776,7 @@ async fn test_completion(cx: &mut gpui::TestAppContext) {
|
|||
two
|
||||
threeˇ
|
||||
"},
|
||||
"overlapping aditional edit",
|
||||
"overlapping additional edit",
|
||||
),
|
||||
(
|
||||
indoc! {"
|
||||
|
|
|
@ -3080,7 +3080,7 @@ mod tests {
|
|||
editor_width: f32,
|
||||
) -> Vec<Invisible> {
|
||||
info!(
|
||||
"Creating editor with mode {editor_mode:?}, witdh {editor_width} and text '{input_text}'"
|
||||
"Creating editor with mode {editor_mode:?}, width {editor_width} and text '{input_text}'"
|
||||
);
|
||||
let (_, editor) = cx.add_window(|cx| {
|
||||
let buffer = MultiBuffer::build_simple(&input_text, cx);
|
||||
|
|
|
@ -5332,7 +5332,7 @@ mod tests {
|
|||
assert_eq!(multibuffer.read(cx).text(), "ABCDE1234\nAB5678");
|
||||
|
||||
// An undo in the multibuffer undoes the multibuffer transaction
|
||||
// and also any individual buffer edits that have occured since
|
||||
// and also any individual buffer edits that have occurred since
|
||||
// that transaction.
|
||||
multibuffer.undo(cx);
|
||||
assert_eq!(multibuffer.read(cx).text(), "AB1234\nAB5678");
|
||||
|
|
|
@ -48,8 +48,8 @@ pub fn marked_display_snapshot(
|
|||
}
|
||||
|
||||
pub fn select_ranges(editor: &mut Editor, marked_text: &str, cx: &mut ViewContext<Editor>) {
|
||||
let (umarked_text, text_ranges) = marked_text_ranges(marked_text, true);
|
||||
assert_eq!(editor.text(cx), umarked_text);
|
||||
let (unmarked_text, text_ranges) = marked_text_ranges(marked_text, true);
|
||||
assert_eq!(editor.text(cx), unmarked_text);
|
||||
editor.change_selections(None, cx, |s| s.select_ranges(text_ranges));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use repository::{FakeGitRepositoryState, GitFileStatus};
|
|||
use std::sync::Weak;
|
||||
|
||||
lazy_static! {
|
||||
static ref LINE_SEPERATORS_REGEX: Regex = Regex::new("\r\n|\r|\u{2028}|\u{2029}").unwrap();
|
||||
static ref LINE_SEPARATORS_REGEX: Regex = Regex::new("\r\n|\r|\u{2028}|\u{2029}").unwrap();
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
@ -77,13 +77,13 @@ impl LineEnding {
|
|||
}
|
||||
|
||||
pub fn normalize(text: &mut String) {
|
||||
if let Cow::Owned(replaced) = LINE_SEPERATORS_REGEX.replace_all(text, "\n") {
|
||||
if let Cow::Owned(replaced) = LINE_SEPARATORS_REGEX.replace_all(text, "\n") {
|
||||
*text = replaced;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn normalize_arc(text: Arc<str>) -> Arc<str> {
|
||||
if let Cow::Owned(replaced) = LINE_SEPERATORS_REGEX.replace_all(&text, "\n") {
|
||||
if let Cow::Owned(replaced) = LINE_SEPARATORS_REGEX.replace_all(&text, "\n") {
|
||||
replaced.into()
|
||||
} else {
|
||||
text
|
||||
|
|
|
@ -6335,9 +6335,9 @@ mod tests {
|
|||
#[crate::test(self)]
|
||||
async fn test_labeled_tasks(cx: &mut TestAppContext) {
|
||||
assert_eq!(None, cx.update(|cx| cx.active_labeled_tasks().next()));
|
||||
let (mut sender, mut reciever) = postage::oneshot::channel::<()>();
|
||||
let (mut sender, mut receiver) = postage::oneshot::channel::<()>();
|
||||
let task = cx
|
||||
.update(|cx| cx.spawn_labeled("Test Label", |_| async move { reciever.recv().await }));
|
||||
.update(|cx| cx.spawn_labeled("Test Label", |_| async move { receiver.recv().await }));
|
||||
|
||||
assert_eq!(
|
||||
Some("Test Label"),
|
||||
|
|
|
@ -67,7 +67,7 @@ impl KeymapMatcher {
|
|||
/// MatchResult::Pending =>
|
||||
/// There exist bindings which are still waiting for more keys.
|
||||
/// MatchResult::Complete(matches) =>
|
||||
/// 1 or more bindings have recieved the necessary key presses.
|
||||
/// 1 or more bindings have received the necessary key presses.
|
||||
/// The order of the matched actions is by position of the matching first,
|
||||
// and order in the keymap second.
|
||||
pub fn push_keystroke(
|
||||
|
|
|
@ -264,7 +264,7 @@ impl settings::Setting for AllLanguageSettings {
|
|||
let mut root_schema = generator.root_schema_for::<Self::FileContent>();
|
||||
|
||||
// Create a schema for a 'languages overrides' object, associating editor
|
||||
// settings with specific langauges.
|
||||
// settings with specific languages.
|
||||
assert!(root_schema
|
||||
.definitions
|
||||
.contains_key("LanguageSettingsContent"));
|
||||
|
|
|
@ -773,7 +773,7 @@ impl<'a> SyntaxMapCaptures<'a> {
|
|||
} in layers
|
||||
{
|
||||
let grammar = match &language.grammar {
|
||||
Some(grammer) => grammer,
|
||||
Some(grammar) => grammar,
|
||||
None => continue,
|
||||
};
|
||||
let query = match query(&grammar) {
|
||||
|
@ -896,7 +896,7 @@ impl<'a> SyntaxMapMatches<'a> {
|
|||
} in layers
|
||||
{
|
||||
let grammar = match &language.grammar {
|
||||
Some(grammer) => grammer,
|
||||
Some(grammar) => grammar,
|
||||
None => continue,
|
||||
};
|
||||
let query = match query(&grammar) {
|
||||
|
|
|
@ -11,7 +11,7 @@ use syn::{parse_macro_input, Block, FnArg, ForeignItemFn, Ident, ItemFn, Pat, Ty
|
|||
/// "Hello from Wasm".into()
|
||||
/// }
|
||||
/// ```
|
||||
/// This macro makes a function defined guest-side avaliable host-side.
|
||||
/// This macro makes a function defined guest-side available host-side.
|
||||
/// Note that all arguments and return types must be `serde`.
|
||||
#[proc_macro_attribute]
|
||||
pub fn export(args: TokenStream, function: TokenStream) -> TokenStream {
|
||||
|
@ -92,7 +92,7 @@ pub fn export(args: TokenStream, function: TokenStream) -> TokenStream {
|
|||
/// #[import]
|
||||
/// pub fn operating_system_name() -> String;
|
||||
/// ```
|
||||
/// This macro makes a function defined host-side avaliable guest-side.
|
||||
/// This macro makes a function defined host-side available guest-side.
|
||||
/// Note that all arguments and return types must be `serde`.
|
||||
/// All that's provided is a signature, as the function is implemented host-side.
|
||||
#[proc_macro_attribute]
|
||||
|
|
|
@ -127,7 +127,7 @@ use plugin_handles::RopeHandle;
|
|||
pub fn append(rope: RopeHandle, string: &str);
|
||||
```
|
||||
|
||||
This allows us to perform an operation on a `Rope`, but how do we get a `RopeHandle` into a plugin? Well, as plugins, we can only aquire resources to handles we're given, so we'd need to expose a fuction that takes a handle.
|
||||
This allows us to perform an operation on a `Rope`, but how do we get a `RopeHandle` into a plugin? Well, as plugins, we can only acquire resources to handles we're given, so we'd need to expose a function that takes a handle.
|
||||
|
||||
To illustrate that point, here's an example. First, we'd define a plugin-side function as follows:
|
||||
|
||||
|
@ -177,7 +177,7 @@ So here's what calling `append_newline` would do, from the top:
|
|||
|
||||
6. And from here on out we return up the callstack, through Wasm, to Rust all the way back to where we started. Right before we return, we clear out the `ResourcePool`, so that we're no longer holding onto the underlying resource.
|
||||
|
||||
Throughout this entire chain of calls, the resource remain host-side. By temporarilty checking it into a `ResourcePool`, we're able to keep a reference to the resource that we can use, while avoiding copying the uncopyable resource.
|
||||
Throughout this entire chain of calls, the resource remain host-side. By temporarily checking it into a `ResourcePool`, we're able to keep a reference to the resource that we can use, while avoiding copying the uncopyable resource.
|
||||
|
||||
## Final Notes
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ impl PluginBuilder {
|
|||
"env",
|
||||
&format!("__{}", name),
|
||||
move |mut caller: Caller<'_, WasiCtxAlloc>, packed_buffer: u64| {
|
||||
// TODO: use try block once avaliable
|
||||
// TODO: use try block once available
|
||||
let result: Result<(WasiBuffer, Memory, _), Trap> = (|| {
|
||||
// grab a handle to the memory
|
||||
let plugin_memory = match caller.get_export("memory") {
|
||||
|
@ -211,7 +211,7 @@ impl PluginBuilder {
|
|||
"env",
|
||||
&format!("__{}", name),
|
||||
move |mut caller: Caller<'_, WasiCtxAlloc>, packed_buffer: u64| {
|
||||
// TODO: use try block once avaliable
|
||||
// TODO: use try block once available
|
||||
let result: Result<(WasiBuffer, Memory, Vec<u8>), Trap> = (|| {
|
||||
// grab a handle to the memory
|
||||
let plugin_memory = match caller.get_export("memory") {
|
||||
|
@ -297,7 +297,7 @@ pub enum PluginBinary<'a> {
|
|||
Precompiled(&'a [u8]),
|
||||
}
|
||||
|
||||
/// Represents a WebAssembly plugin, with access to the WebAssembly System Inferface.
|
||||
/// Represents a WebAssembly plugin, with access to the WebAssembly System Interface.
|
||||
/// Build a new plugin using [`PluginBuilder`].
|
||||
pub struct Plugin {
|
||||
store: Store<WasiCtxAlloc>,
|
||||
|
@ -559,7 +559,7 @@ impl Plugin {
|
|||
.ok_or_else(|| anyhow!("Could not grab slice of plugin memory"))?;
|
||||
|
||||
// write the argument to linear memory
|
||||
// this returns a (ptr, lentgh) pair
|
||||
// this returns a (ptr, length) pair
|
||||
let arg_buffer = Self::bytes_to_buffer(
|
||||
self.store.data().alloc_buffer(),
|
||||
&mut plugin_memory,
|
||||
|
@ -569,7 +569,7 @@ impl Plugin {
|
|||
.await?;
|
||||
|
||||
// call the function, passing in the buffer and its length
|
||||
// this returns a ptr to a (ptr, lentgh) pair
|
||||
// this returns a ptr to a (ptr, length) pair
|
||||
let result_buffer = handle
|
||||
.function
|
||||
.call_async(&mut self.store, arg_buffer.into_u64())
|
||||
|
|
|
@ -4052,7 +4052,7 @@ impl Project {
|
|||
let end_within = range.start.cmp(&primary.end, buffer).is_le()
|
||||
&& range.end.cmp(&primary.end, buffer).is_ge();
|
||||
|
||||
//Skip addtional edits which overlap with the primary completion edit
|
||||
//Skip additional edits which overlap with the primary completion edit
|
||||
//https://github.com/zed-industries/zed/pull/1871
|
||||
if !start_within && !end_within {
|
||||
buffer.edit([(range, text)], None, cx);
|
||||
|
|
|
@ -157,7 +157,7 @@ impl RepositoryEntry {
|
|||
self.statuses
|
||||
.iter_from(&repo_path)
|
||||
.take_while(|(key, _)| key.starts_with(&repo_path))
|
||||
// Short circut once we've found the highest level
|
||||
// Short circuit once we've found the highest level
|
||||
.take_until(|(_, status)| status == &&GitFileStatus::Conflict)
|
||||
.map(|(_, status)| status)
|
||||
.reduce(
|
||||
|
@ -3623,7 +3623,7 @@ pub trait WorktreeHandle {
|
|||
|
||||
impl WorktreeHandle for ModelHandle<Worktree> {
|
||||
// When the worktree's FS event stream sometimes delivers "redundant" events for FS changes that
|
||||
// occurred before the worktree was constructed. These events can cause the worktree to perfrom
|
||||
// occurred before the worktree was constructed. These events can cause the worktree to perform
|
||||
// extra directory scans, and emit extra scan-state notifications.
|
||||
//
|
||||
// This function mutates the worktree's directory and waits for those mutations to be picked up,
|
||||
|
|
|
@ -276,7 +276,7 @@ mod tests {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
// Set up fake langauge server to return fuzzy matches against
|
||||
// Set up fake language server to return fuzzy matches against
|
||||
// a fixed set of symbol names.
|
||||
let fake_symbols = [
|
||||
symbol("one", "/external"),
|
||||
|
|
|
@ -476,7 +476,7 @@ message Symbol {
|
|||
string name = 4;
|
||||
int32 kind = 5;
|
||||
string path = 6;
|
||||
// Cannot use generate anchors for unopend files,
|
||||
// Cannot use generate anchors for unopened files,
|
||||
// so we are forced to use point coords instead
|
||||
PointUtf16 start = 7;
|
||||
PointUtf16 end = 8;
|
||||
|
|
|
@ -42,7 +42,7 @@ impl PublicKey {
|
|||
}
|
||||
|
||||
impl PrivateKey {
|
||||
/// Decrypt a base64-encoded string that was encrypted by the correspoding public key.
|
||||
/// Decrypt a base64-encoded string that was encrypted by the corresponding public key.
|
||||
pub fn decrypt_string(&self, encrypted_string: &str) -> Result<String> {
|
||||
let encrypted_bytes = base64::decode_config(encrypted_string, base64::URL_SAFE)
|
||||
.context("failed to base64-decode encrypted string")?;
|
||||
|
|
|
@ -160,7 +160,7 @@ impl<M: Migrator> ThreadSafeConnection<M> {
|
|||
|
||||
// Create a one shot channel for the result of the queued write
|
||||
// so we can await on the result
|
||||
let (sender, reciever) = oneshot::channel();
|
||||
let (sender, receiver) = oneshot::channel();
|
||||
|
||||
let thread_safe_connection = (*self).clone();
|
||||
write_channel(Box::new(move || {
|
||||
|
@ -168,7 +168,7 @@ impl<M: Migrator> ThreadSafeConnection<M> {
|
|||
let result = connection.with_write(|connection| callback(connection));
|
||||
sender.send(result).ok();
|
||||
}));
|
||||
reciever.map(|response| response.expect("Write queue unexpectedly closed"))
|
||||
receiver.map(|response| response.expect("Write queue unexpectedly closed"))
|
||||
}
|
||||
|
||||
pub(crate) fn create_connection(
|
||||
|
@ -245,10 +245,10 @@ pub fn background_thread_queue() -> WriteQueueConstructor {
|
|||
use std::sync::mpsc::channel;
|
||||
|
||||
Box::new(|| {
|
||||
let (sender, reciever) = channel::<QueuedWrite>();
|
||||
let (sender, receiver) = channel::<QueuedWrite>();
|
||||
|
||||
thread::spawn(move || {
|
||||
while let Ok(write) = reciever.recv() {
|
||||
while let Ok(write) = receiver.recv() {
|
||||
write()
|
||||
}
|
||||
});
|
||||
|
|
|
@ -45,7 +45,7 @@ pub fn convert_color(alac_color: &AnsiColor, style: &TerminalStyle) -> Color {
|
|||
}
|
||||
|
||||
///Converts an 8 bit ANSI color to it's GPUI equivalent.
|
||||
///Accepts usize for compatability with the alacritty::Colors interface,
|
||||
///Accepts usize for compatibility with the alacritty::Colors interface,
|
||||
///Other than that use case, should only be called with values in the [0,255] range
|
||||
pub fn get_color_at_index(index: &usize, style: &TerminalStyle) -> Color {
|
||||
match index {
|
||||
|
@ -78,7 +78,7 @@ pub fn get_color_at_index(index: &usize, style: &TerminalStyle) -> Color {
|
|||
let step = (u8::MAX as f32 / 24.).floor() as u8; //Split the RGB grayscale values into 24 chunks
|
||||
Color::new(i * step, i * step, i * step, u8::MAX) //Map the ANSI-grayscale components to the RGB-grayscale
|
||||
}
|
||||
//For compatability with the alacritty::Colors interface
|
||||
//For compatibility with the alacritty::Colors interface
|
||||
256 => style.foreground,
|
||||
257 => style.background,
|
||||
258 => style.cursor,
|
||||
|
|
|
@ -18,6 +18,6 @@ There are currently many distinct paths for getting keystrokes to the terminal:
|
|||
|
||||
3. IME text. When the special character mappings fail, we pass the keystroke back to GPUI to hand it to the IME system. This comes back to us in the `View::replace_text_in_range()` method, and we then send that to the terminal directly, bypassing `try_keystroke()`.
|
||||
|
||||
4. Pasted text has a seperate pathway.
|
||||
4. Pasted text has a separate pathway.
|
||||
|
||||
Generally, there's a distinction between 'keystrokes that need to be mapped' and 'strings which need to be written'. I've attempted to unify these under the '.try_keystroke()' API and the `.input()` API (which try_keystroke uses) so we have consistent input handling across the terminal
|
|
@ -40,7 +40,7 @@ function contrast_colour {
|
|||
|
||||
# Uncomment the below for more precise luminance calculations
|
||||
|
||||
# # Calculate percieved brightness
|
||||
# # Calculate perceived brightness
|
||||
# # See https://www.w3.org/TR/AERT#color-contrast
|
||||
# # and http://www.itu.int/rec/R-REC-BT.601
|
||||
# # Luminance is in range 0..5000 as each value is 0..5
|
||||
|
|
|
@ -34,7 +34,7 @@ use std::{mem, ops::Range};
|
|||
|
||||
use crate::TerminalView;
|
||||
|
||||
///The information generated during layout that is nescessary for painting
|
||||
///The information generated during layout that is necessary for painting
|
||||
pub struct LayoutState {
|
||||
cells: Vec<LayoutCell>,
|
||||
rects: Vec<LayoutRect>,
|
||||
|
@ -206,7 +206,7 @@ impl TerminalElement {
|
|||
//Expand background rect range
|
||||
{
|
||||
if matches!(bg, Named(NamedColor::Background)) {
|
||||
//Continue to next cell, resetting variables if nescessary
|
||||
//Continue to next cell, resetting variables if necessary
|
||||
cur_alac_color = None;
|
||||
if let Some(rect) = cur_rect {
|
||||
rects.push(rect);
|
||||
|
|
|
@ -804,7 +804,7 @@ mod tests {
|
|||
let workspace = workspace.read(cx);
|
||||
let active_entry = project.read(cx).active_entry();
|
||||
|
||||
//Make sure enviroment is as expeted
|
||||
//Make sure environment is as expected
|
||||
assert!(active_entry.is_none());
|
||||
assert!(workspace.worktrees(cx).next().is_none());
|
||||
|
||||
|
@ -825,7 +825,7 @@ mod tests {
|
|||
let workspace = workspace.read(cx);
|
||||
let active_entry = project.read(cx).active_entry();
|
||||
|
||||
//Make sure enviroment is as expeted
|
||||
//Make sure environment is as expected
|
||||
assert!(active_entry.is_none());
|
||||
assert!(workspace.worktrees(cx).next().is_some());
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ fn test_line_len() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn test_common_prefix_at_positionn() {
|
||||
fn test_common_prefix_at_position() {
|
||||
let text = "a = str; b = δα";
|
||||
let buffer = Buffer::new(0, 0, text.into());
|
||||
|
||||
|
@ -216,7 +216,7 @@ fn test_common_prefix_at_positionn() {
|
|||
empty_range_after(text, "str"),
|
||||
);
|
||||
|
||||
// prefix matching is case insenstive.
|
||||
// prefix matching is case insensitive.
|
||||
assert_eq!(
|
||||
buffer.common_prefix_at(offset1, "Strαngε"),
|
||||
range_of(text, "str"),
|
||||
|
|
|
@ -756,7 +756,7 @@ mod test {
|
|||
ˇ
|
||||
The quick"})
|
||||
.await;
|
||||
// Indoc disallows trailing whitspace.
|
||||
// Indoc disallows trailing whitespace.
|
||||
cx.assert(" ˇ \nThe quick").await;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ use tokio::{
|
|||
use crate::state::Mode;
|
||||
use collections::VecDeque;
|
||||
|
||||
// Neovim doesn't like to be started simultaneously from multiple threads. We use thsi lock
|
||||
// Neovim doesn't like to be started simultaneously from multiple threads. We use this lock
|
||||
// to ensure we are only constructing one neovim connection at a time.
|
||||
#[cfg(feature = "neovim")]
|
||||
lazy_static! {
|
||||
|
|
|
@ -1022,7 +1022,7 @@ impl Pane {
|
|||
let is_active_item = target_item_id == active_item_id;
|
||||
let target_pane = cx.weak_handle();
|
||||
|
||||
// The `CloseInactiveItems` action should really be called "CloseOthers" and the behaviour should be dynamically based on the tab the action is ran on. Currenlty, this is a weird action because you can run it on a non-active tab and it will close everything by the actual active tab
|
||||
// The `CloseInactiveItems` action should really be called "CloseOthers" and the behaviour should be dynamically based on the tab the action is ran on. Currently, this is a weird action because you can run it on a non-active tab and it will close everything by the actual active tab
|
||||
|
||||
self.tab_context_menu.update(cx, |menu, cx| {
|
||||
menu.show(
|
||||
|
|
|
@ -4424,7 +4424,7 @@ mod tests {
|
|||
assert!(!panel.has_focus(cx));
|
||||
});
|
||||
|
||||
// Transfering focus back to the panel keeps it zoomed
|
||||
// Transferring focus back to the panel keeps it zoomed
|
||||
workspace.update(cx, |workspace, cx| {
|
||||
workspace.toggle_panel_focus::<TestPanel>(cx);
|
||||
});
|
||||
|
|
|
@ -207,7 +207,7 @@ impl LspAdapter for EsLintLspAdapter {
|
|||
http: Arc<dyn HttpClient>,
|
||||
) -> Result<Box<dyn 'static + Send + Any>> {
|
||||
// At the time of writing the latest vscode-eslint release was released in 2020 and requires
|
||||
// special custom LSP protocol extensions be handled to fully initalize. Download the latest
|
||||
// special custom LSP protocol extensions be handled to fully initialize. Download the latest
|
||||
// prerelease instead to sidestep this issue
|
||||
let release = latest_github_release("microsoft/vscode-eslint", true, http).await?;
|
||||
Ok(Box::new(GitHubLspBinaryVersion {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Allow binary to be called Zed for a nice application menu when running executable direcly
|
||||
// Allow binary to be called Zed for a nice application menu when running executable directly
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
|
|
|
@ -23,7 +23,7 @@ function checkLicenses(
|
|||
licenses: string[]
|
||||
) {
|
||||
for (const { meta } of schemeMetaWithLicense) {
|
||||
// FIXME: Add support for conjuctions and conditions
|
||||
// FIXME: Add support for conjunctions and conditions
|
||||
if (licenses.indexOf(meta.license.SPDX) < 0) {
|
||||
throw Error(
|
||||
`License for theme ${meta.name} (${meta.license.SPDX}) is not supported`
|
||||
|
|
|
@ -112,7 +112,7 @@ export default function editor(colorScheme: ColorScheme) {
|
|||
widthEm: 0.15,
|
||||
cornerRadius: 0.05,
|
||||
},
|
||||
/** Highlights matching occurences of what is under the cursor
|
||||
/** Highlights matching occurrences of what is under the cursor
|
||||
* as well as matched brackets
|
||||
*/
|
||||
documentHighlightReadBackground: withOpacity(
|
||||
|
|
|
@ -33,7 +33,7 @@ export default function search(colorScheme: ColorScheme) {
|
|||
};
|
||||
|
||||
return {
|
||||
// TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
|
||||
// TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactive
|
||||
matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
|
||||
optionButton: {
|
||||
...text(layer, "mono", "on"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Curve } from "./ref/curves"
|
||||
|
||||
export interface ColorAccessiblityValue {
|
||||
export interface ColorAccessibilityValue {
|
||||
value: number
|
||||
aaPass: boolean
|
||||
aaaPass: boolean
|
||||
|
@ -12,14 +12,14 @@ export interface ColorAccessiblityValue {
|
|||
* @note This implementation is currently basic – Currently we only calculate contrasts against black and white, in the future will allow for dynamic color contrast calculation based on the colors present in a given palette.
|
||||
* @note The goal is to align with WCAG3 accessibility standards as they become stabilized. See the [WCAG 3 Introduction](https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/) for more information.
|
||||
*/
|
||||
export interface ColorAccessiblity {
|
||||
black: ColorAccessiblityValue
|
||||
white: ColorAccessiblityValue
|
||||
export interface ColorAccessibility {
|
||||
black: ColorAccessibilityValue
|
||||
white: ColorAccessibilityValue
|
||||
}
|
||||
|
||||
export type Color = {
|
||||
step: number
|
||||
contrast: ColorAccessiblity
|
||||
contrast: ColorAccessibility
|
||||
hex: string
|
||||
lch: number[]
|
||||
rgba: number[]
|
||||
|
|
Loading…
Reference in a new issue