diff --git a/.zed/settings.json b/.zed/settings.json index 00c0f8e024..e966ceb5d6 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -14,6 +14,12 @@ }, "JSON": { "tab_size": 2, + "preferred_line_length": 100, + "formatter": "prettier" + }, + "JSONC": { + "tab_size": 2, + "preferred_line_length": 100, "formatter": "prettier" }, "JavaScript": { diff --git a/assets/keymaps/atom.json b/assets/keymaps/atom.json index b45ae6d4e2..e1af449e41 100644 --- a/assets/keymaps/atom.json +++ b/assets/keymaps/atom.json @@ -11,18 +11,8 @@ "cmd-b": "editor::GoToDefinition", "alt-cmd-b": "editor::GoToDefinitionSplit", "cmd-<": "editor::ScrollCursorCenter", - "cmd-g": [ - "editor::SelectNext", - { - "replace_newest": true - } - ], - "ctrl-cmd-g": [ - "editor::SelectPrevious", - { - "replace_newest": true - } - ], + "cmd-g": ["editor::SelectNext", { "replace_newest": true }], + "ctrl-cmd-g": ["editor::SelectPrevious", { "replace_newest": true }], "ctrl-shift-down": "editor::AddSelectionBelow", "ctrl-shift-up": "editor::AddSelectionAbove", "cmd-shift-backspace": "editor::DeleteToBeginningOfLine", diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index bf64bcc88a..3e9adb1db3 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -83,48 +83,13 @@ "ctrl-a": "editor::SelectAll", "ctrl-l": "editor::SelectLine", "ctrl-shift-i": "editor::Format", - // "cmd-shift-left": [ - // "editor::SelectToBeginningOfLine", - // { - // "stop_at_soft_wraps": true - // } - // ], - "shift-home": [ - "editor::SelectToBeginningOfLine", - { - "stop_at_soft_wraps": true - } - ], - // "ctrl-shift-a": [ - // "editor::SelectToBeginningOfLine", - // { - // "stop_at_soft_wraps": true - // } - // ], - // "cmd-shift-right": [ - // "editor::SelectToEndOfLine", - // { - // "stop_at_soft_wraps": true - // } - // ], - "shift-end": [ - "editor::SelectToEndOfLine", - { - "stop_at_soft_wraps": true - } - ], - // "ctrl-shift-e": [ - // "editor::SelectToEndOfLine", - // { - // "stop_at_soft_wraps": true - // } - // ], - // "alt-v": [ - // "editor::MovePageUp", - // { - // "center_cursor": true - // } - // ], + // "cmd-shift-left": ["editor::SelectToBeginningOfLine", {"stop_at_soft_wraps": true }], + "shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }], + // "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }], + // "cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + "shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + // "ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + // "alt-v": ["editor::MovePageUp", { "center_cursor": true }], "ctrl-alt-space": "editor::ShowCharacterPalette", "ctrl-;": "editor::ToggleLineNumbers", "ctrl-k ctrl-r": "editor::RevertSelectedHunks", @@ -148,12 +113,7 @@ "replace_enabled": true } ], - // "cmd-e": [ - // "buffer_search::Deploy", - // { - // "focus": false - // } - // ], + // "cmd-e": ["buffer_search::Deploy", { "focus": false }], "ctrl->": "assistant::QuoteSelection", "ctrl-<": "assistant::InsertIntoEditor", "ctrl-alt-e": "editor::SelectEnclosingSymbol" @@ -310,38 +270,13 @@ "ctrl-shift-right": "editor::SelectToNextWordEnd", "ctrl-shift-up": "editor::SelectLargerSyntaxNode", //todo(linux) tmp keybinding "ctrl-shift-down": "editor::SelectSmallerSyntaxNode", //todo(linux) tmp keybinding - "ctrl-d": [ - "editor::SelectNext", - { - "replace_newest": false - } - ], + "ctrl-d": ["editor::SelectNext", { "replace_newest": false }], "ctrl-shift-l": "editor::SelectAllMatches", - "ctrl-shift-d": [ - "editor::SelectPrevious", - { - "replace_newest": false - } - ], - "ctrl-k ctrl-d": [ - "editor::SelectNext", - { - "replace_newest": true - } - ], - "ctrl-k ctrl-shift-d": [ - "editor::SelectPrevious", - { - "replace_newest": true - } - ], + "ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": false }], + "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }], + "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }], "ctrl-k ctrl-i": "editor::Hover", - "ctrl-/": [ - "editor::ToggleComments", - { - "advance_downwards": false - } - ], + "ctrl-/": ["editor::ToggleComments", { "advance_downwards": false }], "ctrl-u": "editor::UndoSelection", "ctrl-shift-u": "editor::RedoSelection", "f8": "editor::GoToDiagnostic", @@ -392,12 +327,7 @@ "context": "Workspace", "bindings": { // Change the default action on `menu::Confirm` by setting the parameter - // "alt-cmd-o": [ - // "projects::OpenRecent", - // { - // "create_new_window": true - // } - // ] + // "alt-cmd-o": ["projects::OpenRecent", { "create_new_window": true }], "alt-ctrl-o": "projects::OpenRecent", "alt-ctrl-shift-b": "branches::OpenRecent", "ctrl-~": "workspace::NewTerminal", @@ -421,12 +351,7 @@ "ctrl-j": "workspace::ToggleBottomDock", "ctrl-alt-y": "workspace::CloseAllDocks", "ctrl-shift-f": "pane::DeploySearch", - "ctrl-shift-h": [ - "pane::DeploySearch", - { - "replace_enabled": true - } - ], + "ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }], "ctrl-k ctrl-s": "zed::OpenKeymap", "ctrl-k ctrl-t": "theme_selector::Toggle", "ctrl-shift-t": "project_symbols::Toggle", diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index 6c49f55d89..cd30c0d35a 100644 --- a/assets/keymaps/default-macos.json +++ b/assets/keymaps/default-macos.json @@ -109,54 +109,14 @@ "cmd-a": "editor::SelectAll", "cmd-l": "editor::SelectLine", "cmd-shift-i": "editor::Format", - "cmd-shift-left": [ - "editor::SelectToBeginningOfLine", - { - "stop_at_soft_wraps": true - } - ], - "shift-home": [ - "editor::SelectToBeginningOfLine", - { - "stop_at_soft_wraps": true - } - ], - "ctrl-shift-a": [ - "editor::SelectToBeginningOfLine", - { - "stop_at_soft_wraps": true - } - ], - "cmd-shift-right": [ - "editor::SelectToEndOfLine", - { - "stop_at_soft_wraps": true - } - ], - "shift-end": [ - "editor::SelectToEndOfLine", - { - "stop_at_soft_wraps": true - } - ], - "ctrl-shift-e": [ - "editor::SelectToEndOfLine", - { - "stop_at_soft_wraps": true - } - ], - "ctrl-v": [ - "editor::MovePageDown", - { - "center_cursor": true - } - ], - "alt-v": [ - "editor::MovePageUp", - { - "center_cursor": true - } - ], + "cmd-shift-left": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }], + "shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }], + "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }], + "cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + "shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + "ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }], + "ctrl-v": ["editor::MovePageDown", { "center_cursor": true }], + "alt-v": ["editor::MovePageUp", { "center_cursor": true }], "ctrl-cmd-space": "editor::ShowCharacterPalette", "cmd-;": "editor::ToggleLineNumbers", "cmd-alt-z": "editor::RevertSelectedHunks", @@ -173,24 +133,9 @@ "cmd-shift-enter": "editor::NewlineAbove", "alt-z": "editor::ToggleSoftWrap", "cmd-f": "buffer_search::Deploy", - "cmd-alt-f": [ - "buffer_search::Deploy", - { - "replace_enabled": true - } - ], - "cmd-alt-l": [ - "buffer_search::Deploy", - { - "selection_search_enabled": true - } - ], - "cmd-e": [ - "buffer_search::Deploy", - { - "focus": false - } - ], + "cmd-alt-f": ["buffer_search::Deploy", { "replace_enabled": true }], + "cmd-alt-l": ["buffer_search::Deploy", { "selection_search_enabled": true }], + "cmd-e": ["buffer_search::Deploy", { "focus": false }], "cmd->": "assistant::QuoteSelection", "cmd-<": "assistant::InsertIntoEditor", "cmd-alt-e": "editor::SelectEnclosingSymbol" @@ -361,38 +306,13 @@ "alt-shift-down": "editor::DuplicateLineDown", "ctrl-shift-right": "editor::SelectLargerSyntaxNode", "ctrl-shift-left": "editor::SelectSmallerSyntaxNode", - "cmd-d": [ - "editor::SelectNext", - { - "replace_newest": false - } - ], + "cmd-d": ["editor::SelectNext", { "replace_newest": false }], "cmd-shift-l": "editor::SelectAllMatches", - "ctrl-cmd-d": [ - "editor::SelectPrevious", - { - "replace_newest": false - } - ], - "cmd-k cmd-d": [ - "editor::SelectNext", - { - "replace_newest": true - } - ], - "cmd-k ctrl-cmd-d": [ - "editor::SelectPrevious", - { - "replace_newest": true - } - ], + "ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": false }], + "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }], + "cmd-k ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": true }], "cmd-k cmd-i": "editor::Hover", - "cmd-/": [ - "editor::ToggleComments", - { - "advance_downwards": false - } - ], + "cmd-/": ["editor::ToggleComments", { "advance_downwards": false }], "cmd-u": "editor::UndoSelection", "cmd-shift-u": "editor::RedoSelection", "f8": "editor::GoToDiagnostic", @@ -443,12 +363,7 @@ "context": "Workspace", "bindings": { // Change the default action on `menu::Confirm` by setting the parameter - // "alt-cmd-o": [ - // "projects::OpenRecent", - // { - // "create_new_window": true - // } - // ] + // "alt-cmd-o": ["projects::OpenRecent", {"create_new_window": true }], "alt-cmd-o": "projects::OpenRecent", "alt-cmd-b": "branches::OpenRecent", "ctrl-~": "workspace::NewTerminal", @@ -472,12 +387,7 @@ "cmd-j": "workspace::ToggleBottomDock", "alt-cmd-y": "workspace::CloseAllDocks", "cmd-shift-f": "pane::DeploySearch", - "cmd-shift-h": [ - "pane::DeploySearch", - { - "replace_enabled": true - } - ], + "cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }], "cmd-k cmd-s": "zed::OpenKeymap", "cmd-k cmd-t": "theme_selector::Toggle", "cmd-t": "project_symbols::Toggle", diff --git a/assets/keymaps/jetbrains.json b/assets/keymaps/jetbrains.json index bd9b881ad0..b8d3dec054 100644 --- a/assets/keymaps/jetbrains.json +++ b/assets/keymaps/jetbrains.json @@ -21,24 +21,9 @@ "cmd--": "editor::Fold", "cmd-+": "editor::UnfoldLines", "alt-shift-g": "editor::SplitSelectionIntoLines", - "ctrl-g": [ - "editor::SelectNext", - { - "replace_newest": false - } - ], - "ctrl-cmd-g": [ - "editor::SelectPrevious", - { - "replace_newest": false - } - ], - "cmd-/": [ - "editor::ToggleComments", - { - "advance_downwards": true - } - ], + "ctrl-g": ["editor::SelectNext", { "replace_newest": false }], + "ctrl-cmd-g": ["editor::SelectPrevious", { "replace_newest": false }], + "cmd-/": ["editor::ToggleComments", { "advance_downwards": true }], "alt-up": "editor::SelectLargerSyntaxNode", "alt-down": "editor::SelectSmallerSyntaxNode", "shift-alt-up": "editor::MoveLineUp", diff --git a/assets/keymaps/textmate.json b/assets/keymaps/textmate.json index 77250acc38..5395e9d940 100644 --- a/assets/keymaps/textmate.json +++ b/assets/keymaps/textmate.json @@ -22,34 +22,14 @@ "alt-shift-delete": "editor::DeleteToNextWordEnd", "ctrl-backspace": "editor::DeleteToPreviousSubwordStart", "ctrl-delete": "editor::DeleteToNextSubwordEnd", - "alt-left": [ - "editor::MoveToPreviousWordStart", - { - "stop_at_soft_wraps": true - } - ], - "alt-right": [ - "editor::MoveToNextWordEnd", - { - "stop_at_soft_wraps": true - } - ], + "alt-left": ["editor::MoveToPreviousWordStart", { "stop_at_soft_wraps": true }], + "alt-right": ["editor::MoveToNextWordEnd", { "stop_at_soft_wraps": true }], "ctrl-left": "editor::MoveToPreviousSubwordStart", "ctrl-right": "editor::MoveToNextSubwordEnd", "cmd-shift-left": "editor::SelectToBeginningOfLine", "cmd-shift-right": "editor::SelectToEndOfLine", - "alt-shift-left": [ - "editor::SelectToPreviousWordStart", - { - "stop_at_soft_wraps": true - } - ], - "alt-shift-right": [ - "editor::SelectToNextWordEnd", - { - "stop_at_soft_wraps": true - } - ], + "alt-shift-left": ["editor::SelectToPreviousWordStart", { "stop_at_soft_wraps": true }], + "alt-shift-right": ["editor::SelectToNextWordEnd", { "stop_at_soft_wraps": true }], "ctrl-shift-left": "editor::SelectToPreviousSubwordStart", "ctrl-shift-right": "editor::SelectToNextSubwordEnd", "ctrl-w": "editor::SelectNext", diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json index 7a0b2646d6..33f2db66fa 100644 --- a/assets/keymaps/vim.json +++ b/assets/keymaps/vim.json @@ -8,22 +8,8 @@ { "context": "Editor && VimControl && !VimWaiting && !menu", "bindings": { - "i": [ - "vim::PushOperator", - { - "Object": { - "around": false - } - } - ], - "a": [ - "vim::PushOperator", - { - "Object": { - "around": true - } - } - ], + "i": ["vim::PushOperator", { "Object": { "around": false } }], + "a": ["vim::PushOperator", { "Object": { "around": true } }], ":": "command_palette::Toggle", "h": "vim::Left", "left": "vim::Left", @@ -57,92 +43,25 @@ // "b": "vim::PreviousSubwordStart", // "e": "vim::NextSubwordEnd", // "g e": "vim::PreviousSubwordEnd", - "shift-w": [ - "vim::NextWordStart", - { - "ignorePunctuation": true - } - ], - "shift-e": [ - "vim::NextWordEnd", - { - "ignorePunctuation": true - } - ], - "shift-b": [ - "vim::PreviousWordStart", - { - "ignorePunctuation": true - } - ], - "g shift-e": [ - "vim::PreviousWordEnd", - { - "ignorePunctuation": true - } - ], + "shift-w": ["vim::NextWordStart", { "ignorePunctuation": true }], + "shift-e": ["vim::NextWordEnd", { "ignorePunctuation": true }], + "shift-b": ["vim::PreviousWordStart", { "ignorePunctuation": true }], + "g shift-e": ["vim::PreviousWordEnd", { "ignorePunctuation": true }], "/": "vim::Search", "g /": "pane::DeploySearch", - "?": [ - "vim::Search", - { - "backwards": true - } - ], + "?": ["vim::Search", { "backwards": true }], "*": "vim::MoveToNext", "#": "vim::MoveToPrev", "n": "vim::MoveToNextMatch", "shift-n": "vim::MoveToPrevMatch", "%": "vim::Matching", - "f": [ - "vim::PushOperator", - { - "FindForward": { - "before": false - } - } - ], - "t": [ - "vim::PushOperator", - { - "FindForward": { - "before": true - } - } - ], - "shift-f": [ - "vim::PushOperator", - { - "FindBackward": { - "after": false - } - } - ], - "shift-t": [ - "vim::PushOperator", - { - "FindBackward": { - "after": true - } - } - ], + "f": ["vim::PushOperator", { "FindForward": { "before": false } }], + "t": ["vim::PushOperator", { "FindForward": { "before": true } }], + "shift-f": ["vim::PushOperator", { "FindBackward": { "after": false } }], + "shift-t": ["vim::PushOperator", { "FindBackward": { "after": true } }], "m": ["vim::PushOperator", "Mark"], - "'": [ - "vim::PushOperator", - { - "Jump": { - "line": true - } - } - ], - "`": [ - "vim::PushOperator", - { - "Jump": { - "line": false - } - } - ], + "'": ["vim::PushOperator", { "Jump": { "line": true } }], + "`": ["vim::PushOperator", { "Jump": { "line": false } }], ";": "vim::RepeatFind", ",": "vim::RepeatFindReversed", "ctrl-o": "pane::GoBack", @@ -179,90 +98,25 @@ "g shift-n": "vim::SelectPreviousMatch", "g l": "vim::SelectNext", "g shift-l": "vim::SelectPrevious", - "g >": [ - "editor::SelectNext", - { - "replace_newest": true - } - ], - "g <": [ - "editor::SelectPrevious", - { - "replace_newest": true - } - ], + "g >": ["editor::SelectNext", { "replace_newest": true }], + "g <": ["editor::SelectPrevious", { "replace_newest": true }], "g a": "editor::SelectAllMatches", "g s": "outline::Toggle", "g shift-s": "project_symbols::Toggle", "g .": "editor::ToggleCodeActions", // zed specific "g shift-a": "editor::FindAllReferences", // zed specific "g space": "editor::OpenExcerpts", // zed specific - "g *": [ - "vim::MoveToNext", - { - "partialWord": true - } - ], - "g #": [ - "vim::MoveToPrev", - { - "partialWord": true - } - ], - "g j": [ - "vim::Down", - { - "displayLines": true - } - ], - "g down": [ - "vim::Down", - { - "displayLines": true - } - ], - "g k": [ - "vim::Up", - { - "displayLines": true - } - ], - "g up": [ - "vim::Up", - { - "displayLines": true - } - ], - "g $": [ - "vim::EndOfLine", - { - "displayLines": true - } - ], - "g end": [ - "vim::EndOfLine", - { - "displayLines": true - } - ], - "g 0": [ - "vim::StartOfLine", - { - "displayLines": true - } - ], - "g home": [ - "vim::StartOfLine", - { - "displayLines": true - } - ], - "g ^": [ - "vim::FirstNonWhitespace", - { - "displayLines": true - } - ], + "g *": ["vim::MoveToNext", { "partialWord": true }], + "g #": ["vim::MoveToPrev", { "partialWord": true }], + "g j": ["vim::Down", { "displayLines": true }], + "g down": ["vim::Down", { "displayLines": true }], + "g k": ["vim::Up", { "displayLines": true }], + "g up": ["vim::Up", { "displayLines": true }], + "g $": ["vim::EndOfLine", { "displayLines": true }], + "g end": ["vim::EndOfLine", { "displayLines": true }], + "g 0": ["vim::StartOfLine", { "displayLines": true }], + "g home": ["vim::StartOfLine", { "displayLines": true }], + "g ^": ["vim::FirstNonWhitespace", { "displayLines": true }], "g v": "vim::RestoreVisualSelection", "g ]": "editor::GoToDiagnostic", "g [": "editor::GoToPrevDiagnostic", @@ -280,18 +134,8 @@ "z c": "editor::Fold", "z o": "editor::UnfoldLines", "z f": "editor::FoldSelectedRanges", - "shift-z shift-q": [ - "pane::CloseActiveItem", - { - "saveIntent": "skip" - } - ], - "shift-z shift-z": [ - "pane::CloseActiveItem", - { - "saveIntent": "saveAll" - } - ], + "shift-z shift-q": ["pane::CloseActiveItem", { "saveIntent": "skip" }], + "shift-z shift-z": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }], // Count support "1": ["vim::Number", 1], "2": ["vim::Number", 2], @@ -386,12 +230,7 @@ "ctrl-a": "vim::Increment", "ctrl-x": "vim::Decrement", "p": "vim::Paste", - "shift-p": [ - "vim::Paste", - { - "before": true - } - ], + "shift-p": ["vim::Paste", { "before": true }], "u": "editor::Undo", "ctrl-r": "editor::Redo", "r": ["vim::PushOperator", "Replace"], @@ -442,12 +281,7 @@ { "context": "Editor && vim_mode == normal && vim_operator == c", "bindings": { - "s": [ - "vim::PushOperator", - { - "ChangeSurrounds": {} - } - ] + "s": ["vim::PushOperator", { "ChangeSurrounds": {} }] } }, { @@ -492,12 +326,7 @@ { "context": "Editor && vim_mode == normal && vim_operator == y", "bindings": { - "s": [ - "vim::PushOperator", - { - "AddSurrounds": {} - } - ] + "s": ["vim::PushOperator", { "AddSurrounds": {} }] } }, { @@ -522,12 +351,7 @@ "context": "Editor && VimObject", "bindings": { "w": "vim::Word", - "shift-w": [ - "vim::Word", - { - "ignorePunctuation": true - } - ], + "shift-w": ["vim::Word", { "ignorePunctuation": true }], "t": "vim::Tag", "s": "vim::Sentence", "p": "vim::Paragraph", @@ -562,43 +386,18 @@ "y": "vim::VisualYank", "shift-y": "vim::VisualYank", "p": "vim::Paste", - "shift-p": [ - "vim::Paste", - { - "preserveClipboard": true - } - ], + "shift-p": ["vim::Paste", { "preserveClipboard": true }], "s": "vim::Substitute", "shift-s": "vim::SubstituteLine", "shift-r": "vim::SubstituteLine", "c": "vim::Substitute", "~": "vim::ChangeCase", - "*": [ - "vim::MoveToNext", - { - "partialWord": true - } - ], - "#": [ - "vim::MoveToPrev", - { - "partialWord": true - } - ], + "*": ["vim::MoveToNext", { "partialWord": true }], + "#": ["vim::MoveToPrev", { "partialWord": true }], "ctrl-a": "vim::Increment", "ctrl-x": "vim::Decrement", - "g ctrl-a": [ - "vim::Increment", - { - "step": true - } - ], - "g ctrl-x": [ - "vim::Decrement", - { - "step": true - } - ], + "g ctrl-a": ["vim::Increment", { "step": true }], + "g ctrl-x": ["vim::Decrement", { "step": true }], "shift-i": "vim::InsertBefore", "shift-a": "vim::InsertAfter", "shift-j": "vim::JoinLines", @@ -608,22 +407,8 @@ "ctrl-[": ["vim::SwitchMode", "Normal"], ">": "vim::Indent", "<": "vim::Outdent", - "i": [ - "vim::PushOperator", - { - "Object": { - "around": false - } - } - ], - "a": [ - "vim::PushOperator", - { - "Object": { - "around": true - } - } - ] + "i": ["vim::PushOperator", { "Object": { "around": false } }], + "a": ["vim::PushOperator", { "Object": { "around": true } }] } }, {