mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 11:01:40 +03:00
Add typo detection to CI (#4107)
Adding the typos crate to our CI will take some doing, as we have several tests which rely on typos in various ways (e.g. checking state as the user types), but I thought I'd take a first stab at fixing what it finds. Release Notes: - N/A
This commit is contained in:
commit
aa7351041d
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -23,7 +23,7 @@ env:
|
||||
|
||||
jobs:
|
||||
style:
|
||||
name: Check formatting and Clippy lints
|
||||
name: Check formatting, Clippy lints, and spelling
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- test
|
||||
@ -38,6 +38,13 @@ jobs:
|
||||
- name: Set up default .cargo/config.toml
|
||||
run: cp ./.cargo/ci-config.toml ~/.cargo/config.toml
|
||||
|
||||
- name: Check spelling
|
||||
run: |
|
||||
if ! which typos > /dev/null; then
|
||||
cargo install typos-cli
|
||||
fi
|
||||
typos
|
||||
|
||||
- name: Run style checks
|
||||
uses: ./.github/actions/check_style
|
||||
|
||||
|
@ -54,4 +54,4 @@ We're happy to pair with you to help you learn the codebase and get your contrib
|
||||
Reviewing code in a pull request, after the fact, is hard and tedious - the team generally likes to build trust and review code through pair programming.
|
||||
We'd prefer have conversations about the code, through Zed, while it is being written, so decisions can be made in real-time and less time is spent on fixing things after the fact. Ideally, GitHub is only used to merge code that has already been discussed and reviewed in Zed.
|
||||
|
||||
Remeber that smaller, incremental PRs are easier to review and merge than large PRs.
|
||||
Remember that smaller, incremental PRs are easier to review and merge than large PRs.
|
||||
|
@ -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);
|
||||
|
@ -2918,7 +2918,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))?
|
||||
|
@ -152,7 +152,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");
|
||||
@ -970,7 +970,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 {
|
||||
|
@ -3116,7 +3116,7 @@ async fn leave_channel_chat(request: proto::LeaveChannelChat, session: Session)
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Retrive the chat history for a channel
|
||||
/// Retrieve the chat history for a channel
|
||||
async fn get_channel_messages(
|
||||
request: proto::GetChannelMessages,
|
||||
response: Response<proto::GetChannelMessages>,
|
||||
|
@ -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(),
|
||||
|
@ -1192,7 +1192,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!(
|
||||
@ -1211,7 +1211,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
|
||||
@ -1327,7 +1327,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 {
|
||||
@ -1350,7 +1350,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
|
||||
@ -1824,7 +1824,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"
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -1737,6 +1737,11 @@ async fn test_following_into_excluded_file(
|
||||
vec![18..17]
|
||||
);
|
||||
|
||||
editor_for_excluded_a.update(cx_a, |editor, cx| {
|
||||
editor.select_right(&Default::default(), cx);
|
||||
});
|
||||
executor.run_until_parked();
|
||||
|
||||
// Changes from B to the excluded file are replicated in A's editor
|
||||
editor_for_excluded_b.update(cx_b, |editor, cx| {
|
||||
editor.handle_input("\nCo-Authored-By: B <b@b.b>", cx);
|
||||
@ -1745,7 +1750,7 @@ async fn test_following_into_excluded_file(
|
||||
editor_for_excluded_a.update(cx_a, |editor, cx| {
|
||||
assert_eq!(
|
||||
editor.text(cx),
|
||||
"new commit messag\nCo-Authored-By: B <b@b.b>"
|
||||
"new commit message\nCo-Authored-By: B <b@b.b>"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -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)),
|
||||
)
|
||||
|
@ -8533,7 +8533,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);
|
||||
@ -8543,7 +8543,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
|
||||
|
@ -960,14 +960,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,
|
||||
@ -1484,7 +1484,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"
|
||||
);
|
||||
});
|
||||
}
|
||||
@ -1634,7 +1634,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);
|
||||
@ -2647,7 +2647,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| {
|
||||
@ -2763,7 +2763,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>;
|
||||
|
||||
|
@ -967,8 +967,8 @@ impl AppContext {
|
||||
}
|
||||
|
||||
/// Register a callback to be invoked when a keystroke is received by the application
|
||||
/// in any window. Note that this fires after all other action and event mechansims have resolved
|
||||
/// and that this API will not be invoked if the event's propogation is stopped.
|
||||
/// in any window. Note that this fires after all other action and event mechanisms have resolved
|
||||
/// and that this API will not be invoked if the event's propagation is stopped.
|
||||
pub fn observe_keystrokes(
|
||||
&mut self,
|
||||
f: impl FnMut(&KeystrokeEvent, &mut WindowContext) + 'static,
|
||||
|
@ -615,7 +615,7 @@ mod test {
|
||||
// Reset
|
||||
state.reset(5);
|
||||
|
||||
// And then recieve a scroll event _before_ the next paint
|
||||
// And then receive a scroll event _before_ the next paint
|
||||
cx.simulate_event(ScrollWheelEvent {
|
||||
position: point(px(1.), px(1.)),
|
||||
delta: ScrollDelta::Pixels(point(px(0.), px(-500.))),
|
||||
|
@ -150,7 +150,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 {
|
||||
@ -277,7 +277,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();
|
||||
|
@ -444,7 +444,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(),
|
||||
@ -453,7 +453,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,
|
||||
|
@ -200,7 +200,7 @@ impl<V> PartialEq for WeakView<V> {
|
||||
|
||||
impl<V> Eq for WeakView<V> {}
|
||||
|
||||
/// A dynically-typed handle to a view, which can be downcast to a [View] for a specific type.
|
||||
/// A dynamically-typed handle to a view, which can be downcast to a [View] for a specific type.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct AnyView {
|
||||
model: AnyModel,
|
||||
|
@ -2131,7 +2131,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.
|
||||
|
@ -873,7 +873,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 )*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
search_history.current(),
|
||||
None,
|
||||
"No current selection should be set fo the default search history"
|
||||
"No current selection should be set for the default search history"
|
||||
);
|
||||
|
||||
search_history.add("rust".to_string());
|
||||
|
@ -2700,7 +2700,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)
|
||||
@ -626,7 +626,7 @@ async fn test_code_context_retrieval_lua() {
|
||||
-- Any functions this instance does not know of will 'look up' to the superclass definition.
|
||||
setmetatable(instance, { __index = classdef, __newindex = mastertable })
|
||||
return instance
|
||||
end"#.unindent(), 809),
|
||||
end"#.unindent(), 810),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -332,7 +332,7 @@ impl Vim {
|
||||
}
|
||||
}
|
||||
|
||||
/// Explicitly record one action (equiavlent to start_recording and stop_recording)
|
||||
/// Explicitly record one action (equivalents to start_recording and stop_recording)
|
||||
pub fn record_current_action(&mut self, cx: &mut WindowContext) {
|
||||
self.start_recording(cx);
|
||||
self.stop_recording();
|
||||
|
@ -201,15 +201,13 @@ 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,
|
||||
);
|
||||
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.start) as u32,
|
||||
);
|
||||
let mut end =
|
||||
DisplayPoint::new(row, laid_out_line.closest_index_for_x(positions.end) as u32);
|
||||
if end <= start {
|
||||
if start.column() == map.line_len(start.row()) {
|
||||
end = start;
|
||||
@ -218,7 +216,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 ..
|
||||
|
@ -90,7 +90,7 @@ This means that when releasing a new version of Zed that has changes to the RPC
|
||||
1. If needing a migration:
|
||||
- First check that the migration is valid. The database serves both preview and stable simultaneously, so new columns need to have defaults and old tables or columns can't be dropped.
|
||||
- Then use `script/deploy-migration` <release channel> <version number> (production, staging, preview, nightly). ex: `script/deploy-migration preview 0.19.0`
|
||||
- If there is an 'Error: container is waiting to start', you can review logs manually with: `kubectl --namespace <enviroment> logs <pod name>` to make sure the mgiration ran successfully.
|
||||
- If there is an 'Error: container is waiting to start', you can review logs manually with: `kubectl --namespace <environment> logs <pod name>` to make sure the mgiration ran successfully.
|
||||
1. Once that CI job completes, you will be able to run the following command to deploy that docker image. The script takes two arguments: an environment (`production`, `preview`, or `staging`), and a version number (e.g. `0.10.1`):
|
||||
|
||||
```
|
||||
|
@ -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:
|
||||
|
||||
|
22
typos.toml
Normal file
22
typos.toml
Normal file
@ -0,0 +1,22 @@
|
||||
[files]
|
||||
ignore-files = true
|
||||
extend-exclude = [
|
||||
# glsl isn't recognized by this tool
|
||||
"crates/zed/src/languages/glsl/*",
|
||||
# File suffixes aren't typos
|
||||
"assets/icons/file_icons/file_types.json",
|
||||
# Not our typos
|
||||
"assets/themes/src/vscode/*",
|
||||
"crates/live_kit_server/*",
|
||||
# Vim makes heavy use of partial typing tables
|
||||
"crates/vim/*",
|
||||
# Editor and file finder rely on partial typing and custom in-string syntax
|
||||
"crates/file_finder/src/file_finder.rs",
|
||||
"crates/editor/src/editor_tests.rs",
|
||||
# :/
|
||||
"crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql",
|
||||
]
|
||||
|
||||
[default]
|
||||
extend-ignore-re = ["ba"]
|
||||
check-filename = true
|
Loading…
Reference in New Issue
Block a user