mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
zed: base config
This commit is contained in:
parent
7d579743ea
commit
0e851754d7
5 changed files with 80 additions and 157 deletions
|
|
@ -34,6 +34,7 @@ scripts
|
||||||
.config/lsd
|
.config/lsd
|
||||||
.config/keyd
|
.config/keyd
|
||||||
.config/readline
|
.config/readline
|
||||||
|
.chezmoiscripts/*
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,13 +132,13 @@ local leader_mappings = {
|
||||||
},
|
},
|
||||||
w = { -- +window
|
w = { -- +window
|
||||||
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
||||||
{ keys = "n", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
{ keys = "j", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
||||||
{ keys = "e", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
{ keys = "k", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
||||||
{ keys = "i", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
{ keys = "l", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
||||||
{ keys = "H", cmd = "<C-w>H", opts = { desc = "Move Window Left" } },
|
{ keys = "H", cmd = "<C-w>H", opts = { desc = "Move Window Left" } },
|
||||||
{ keys = "N", cmd = "<C-w>J", opts = { desc = "Move Window Down" } },
|
{ keys = "J", cmd = "<C-w>J", opts = { desc = "Move Window Down" } },
|
||||||
{ keys = "E", cmd = "<C-w>K", opts = { desc = "Move Window Up" } },
|
{ keys = "K", cmd = "<C-w>K", opts = { desc = "Move Window Up" } },
|
||||||
{ keys = "I", cmd = "<C-w>L", opts = { desc = "Move Window Right" } },
|
{ keys = "L", cmd = "<C-w>L", opts = { desc = "Move Window Right" } },
|
||||||
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
||||||
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||||
{ keys = "/", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
{ keys = "/", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,11 @@
|
||||||
// Windows: %APPDATA%\Zed\keymaps.json
|
// Windows: %APPDATA%\Zed\keymaps.json
|
||||||
// Linking: (link the whole directory)
|
// Linking: (link the whole directory)
|
||||||
// ln -sf $DOTFILES/tools/zed ~/.config/zed
|
// ln -sf $DOTFILES/tools/zed ~/.config/zed
|
||||||
|
|
||||||
// Zed keymap
|
// Zed keymap
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
// For information on binding keys, see the Zed
|
// For information on binding keys, see the Zed
|
||||||
|
|
||||||
// documentation: https://zed.dev/docs/key-bindings
|
// documentation: https://zed.dev/docs/key-bindings
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
// To see the default key bindings run `zed: open default keymap`
|
// To see the default key bindings run `zed: open default keymap`
|
||||||
|
|
||||||
// from the command palette.
|
// from the command palette.
|
||||||
|
|
||||||
// https://github.com/zed-industries/zed/tree/main/assets/keymaps
|
// https://github.com/zed-industries/zed/tree/main/assets/keymaps
|
||||||
// Sequence: https://zed.dev/docs/key-bindings#remapping-keys
|
// Sequence: https://zed.dev/docs/key-bindings#remapping-keys
|
||||||
[
|
[
|
||||||
|
|
@ -39,17 +29,17 @@
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
// "j k": ["workspace::SendKeystrokes", "escape"]
|
// "j k": ["workspace::SendKeystrokes", "escape"]
|
||||||
"alt-e": "editor::AddSelectionAbove", // Insert Cursor Above
|
"alt-k": "editor::AddSelectionAbove", // Insert Cursor Above
|
||||||
"alt-n": "editor::AddSelectionBelow" // Insert Cursor Below
|
"alt-j": "editor::AddSelectionBelow" // Insert Cursor Below
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "vim_mode == normal || vim_mode == visual",
|
"context": "vim_mode == normal || vim_mode == visual",
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"N": "vim::JoinLines",
|
"J": "vim::JoinLines",
|
||||||
"l": "vim::InsertBefore",
|
"i": "vim::InsertBefore",
|
||||||
"L": "vim::InsertFirstNonWhitespace"
|
"I": "vim::InsertFirstNonWhitespace"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -57,7 +47,7 @@
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"H": "vim::StartOfLine",
|
"H": "vim::StartOfLine",
|
||||||
"I": "vim::EndOfLine"
|
"L": "vim::EndOfLine"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -65,35 +55,42 @@
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"H": "pane::ActivatePreviousItem",
|
"H": "pane::ActivatePreviousItem",
|
||||||
"I": "pane::ActivateNextItem"
|
"L": "pane::ActivateNextItem"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
// "context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
||||||
|
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"space space": "file_finder::Toggle",
|
"space space": "file_finder::Toggle",
|
||||||
"space ;": "command_palette::Toggle",
|
"space ;": "command_palette::Toggle",
|
||||||
|
"space /": "pane::DeploySearch",
|
||||||
"space f c": "zed::OpenSettings",
|
"space f c": "zed::OpenSettings",
|
||||||
"space f e c": "zed::OpenSettings",
|
"space f e c": "zed::OpenSettings",
|
||||||
"space f t": "project_panel::ToggleFocus",
|
"space f t": "project_panel::ToggleFocus",
|
||||||
|
"space c f": "editor::Format",
|
||||||
"ctrl-w h": "workspace::ActivatePaneLeft",
|
"ctrl-w h": "workspace::ActivatePaneLeft",
|
||||||
"ctrl-w i": "workspace::ActivatePaneRight",
|
"ctrl-w l": "workspace::ActivatePaneRight",
|
||||||
"ctrl-w e": "workspace::ActivatePaneUp",
|
"ctrl-w k": "workspace::ActivatePaneUp",
|
||||||
"ctrl-w n": "workspace::ActivatePaneDown"
|
"ctrl-w j": "workspace::ActivatePaneDown",
|
||||||
|
"[ d": "editor::GoToPreviousDiagnostic",
|
||||||
|
"] d": "editor::GoToDiagnostic",
|
||||||
|
"[ g": "editor::GoToPreviousHunk",
|
||||||
|
"] g": "editor::GoToHunk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "vim_mode == normal || vim_mode == visual || vim_mode == operator",
|
"context": "vim_mode == normal || vim_mode == visual || vim_mode == operator",
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"n": "vim::Down",
|
"j": "vim::Down",
|
||||||
"e": "vim::Up",
|
"k": "vim::Up",
|
||||||
"i": "vim::Right",
|
"l": "vim::Right",
|
||||||
"k": "search::SelectNextMatch",
|
"n": "search::SelectNextMatch",
|
||||||
"K": "search::SelectPreviousMatch",
|
"N": "search::SelectPreviousMatch",
|
||||||
"N": ["workspace::SendKeystrokes", "n n n n n"],
|
"J": ["workspace::SendKeystrokes", "j j j j j"],
|
||||||
"E": ["workspace::SendKeystrokes", "e e e e e"],
|
"K": ["workspace::SendKeystrokes", "k k k k k"],
|
||||||
"Y": ["workspace::SendKeystrokes", "y $"]
|
"Y": ["workspace::SendKeystrokes", "y $"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -101,12 +98,27 @@
|
||||||
"context": "ProjectPanel && not_editing",
|
"context": "ProjectPanel && not_editing",
|
||||||
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"n": "menu::SelectNext",
|
"j": "menu::SelectNext",
|
||||||
"e": "menu::SelectPrevious",
|
"k": "menu::SelectPrevious",
|
||||||
"i": "project_panel::ExpandSelectedEntry",
|
"i": "project_panel::ExpandSelectedEntry",
|
||||||
"A": "project_panel::NewDirectory",
|
"A": "project_panel::NewDirectory",
|
||||||
"a": "project_panel::NewFile",
|
"a": "project_panel::NewFile",
|
||||||
"d": "project_panel::Delete"
|
"d": "project_panel::Delete"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Terminal",
|
||||||
|
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-p": ["terminal::SendKeystroke", "ctrl-p"],
|
||||||
|
"ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
|
||||||
|
"ctrl-T": "workspace::NewTerminal",
|
||||||
|
"ctrl-w": null,
|
||||||
|
"ctrl-w ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
|
||||||
|
"ctrl-w h": "workspace::ActivatePaneLeft",
|
||||||
|
"ctrl-w k": "workspace::ActivatePaneUp",
|
||||||
|
"ctrl-w l": "workspace::ActivatePaneRight",
|
||||||
|
"ctrl-w j": "workspace::ActivatePaneDown"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
// $DOTFILES/tools/zed/keymaps.json
|
|
||||||
// Date: 2025-01-25
|
|
||||||
// Author: js0ny
|
|
||||||
// Description: Zed keymaps
|
|
||||||
|
|
||||||
// Location:
|
|
||||||
// GNU/Linux: ~/.config/zed/keymaps.json
|
|
||||||
// Windows: %APPDATA%\Zed\keymaps.json
|
|
||||||
// Linking: (link the whole directory)
|
|
||||||
// ln -sf $DOTFILES/tools/zed ~/.config/zed
|
|
||||||
|
|
||||||
// Zed keymap
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
// For information on binding keys, see the Zed
|
|
||||||
|
|
||||||
// documentation: https://zed.dev/docs/key-bindings
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
// To see the default key bindings run `zed: open default keymap`
|
|
||||||
|
|
||||||
// from the command palette.
|
|
||||||
|
|
||||||
// https://github.com/zed-industries/zed/tree/main/assets/keymaps
|
|
||||||
// Sequence: https://zed.dev/docs/key-bindings#remapping-keys
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"context": "Workspace",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
// "shift shift": "file_finder::Toggle"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"context": "Editor",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
// "j k": ["workspace::SendKeystrokes", "escape"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "vim_mode == normal || vim_mode == visual",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"N": "vim::JoinLines",
|
|
||||||
"l": "vim::InsertBefore",
|
|
||||||
"L": "vim::InsertFirstNonWhitespace"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "vim_mode == visual || vim_mode == operator",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"H": "vim::StartOfLine",
|
|
||||||
"I": "vim::EndOfLine"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "vim_mode == normal",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"H": "pane::ActivatePrevItem",
|
|
||||||
"I": "pane::ActivateNextItem"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"space space": "file_finder::Toggle",
|
|
||||||
"space ;": "command_palette::Toggle",
|
|
||||||
"space f c": "zed::OpenSettings",
|
|
||||||
"space f e c": "zed::OpenSettings",
|
|
||||||
"space f t": "project_panel::ToggleFocus",
|
|
||||||
"ctrl-w h": "workspace::ActivatePaneLeft",
|
|
||||||
"ctrl-w i": "workspace::ActivatePaneRight",
|
|
||||||
"ctrl-w e": "workspace::ActivatePaneUp",
|
|
||||||
"ctrl-w n": "workspace::ActivatePaneDown"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "vim_mode == normal || vim_mode == visual || vim_mode == operator",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"n": "vim::Down",
|
|
||||||
"e": "vim::Up",
|
|
||||||
"i": "vim::Right",
|
|
||||||
"k": "search::SelectNextMatch",
|
|
||||||
"K": "search::SelectPrevMatch",
|
|
||||||
"N": ["workspace::SendKeystrokes", "n n n n n"],
|
|
||||||
"E": ["workspace::SendKeystrokes", "e e e e e"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "ProjectPanel && not_editing",
|
|
||||||
|
|
||||||
"bindings": {
|
|
||||||
"n": "menu::SelectNext",
|
|
||||||
"e": "menu::SelectPrev",
|
|
||||||
"i": "project_panel::ExpandSelectedEntry",
|
|
||||||
"A": "project_panel::NewDirectory",
|
|
||||||
"a": "project_panel::NewFile",
|
|
||||||
"d": "project_panel::Delete"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -18,6 +18,25 @@
|
||||||
// custom settings, run `zed: open default settings` from the
|
// custom settings, run `zed: open default settings` from the
|
||||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
{
|
{
|
||||||
|
// Theming
|
||||||
|
"icon_theme": "Material Icon Theme",
|
||||||
|
"theme": {
|
||||||
|
"mode": "system",
|
||||||
|
"light": "Rosé Pine Dawn",
|
||||||
|
"dark": "Catppuccin Macchiato"
|
||||||
|
},
|
||||||
|
"tabs": {
|
||||||
|
"show_diagnostics": "errors",
|
||||||
|
"show_close_button": "hover",
|
||||||
|
"file_icons": true
|
||||||
|
},
|
||||||
|
// Base keymaps
|
||||||
|
"base_keymap": "VSCode",
|
||||||
|
"vim_mode": true,
|
||||||
|
"vim": {
|
||||||
|
"use_system_clipboard": "on_yank",
|
||||||
|
"use_smartcase_find": true
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"edit_prediction_provider": "zed"
|
"edit_prediction_provider": "zed"
|
||||||
},
|
},
|
||||||
|
|
@ -32,32 +51,32 @@
|
||||||
"proxy_no_verify": null
|
"proxy_no_verify": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"base_keymap": "VSCode",
|
|
||||||
"vim_mode": true,
|
|
||||||
"ui_font_size": 16,
|
"ui_font_size": 16,
|
||||||
"buffer_font_size": null,
|
"buffer_font_size": null,
|
||||||
"theme": {
|
|
||||||
"mode": "system",
|
|
||||||
"light": "Rosé Pine Dawn",
|
|
||||||
"dark": "Kanagawa Dragon"
|
|
||||||
},
|
|
||||||
"relative_line_numbers": true,
|
"relative_line_numbers": true,
|
||||||
"buffer_font_family": "Maple Mono NF CN",
|
"buffer_font_family": "Zed Plex Mono",
|
||||||
"remove_trailing_whitespace_on_save": true,
|
"remove_trailing_whitespace_on_save": true,
|
||||||
"assistant": {
|
"agent": {
|
||||||
"default_model": {
|
"default_model": {
|
||||||
"provider": "copilot_chat",
|
"provider": "copilot_chat",
|
||||||
"model": "claude-3-7-sonnet"
|
"model": "claude-3-7-sonnet"
|
||||||
},
|
}
|
||||||
"version": "2"
|
|
||||||
},
|
},
|
||||||
"inlay_hints": {
|
"inlay_hints": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"show_type_hints": true
|
"show_type_hints": true,
|
||||||
|
"show_parameter_hints": true
|
||||||
},
|
},
|
||||||
"terminal": {
|
"terminal": {
|
||||||
"env": {
|
"env": {
|
||||||
"EDITOR": "zed --wait"
|
"EDITOR": "zed --wait"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"file_types": {
|
||||||
|
"JSON": ["*.code-snippets"]
|
||||||
|
},
|
||||||
|
"telemetry": {
|
||||||
|
"diagnostics": false,
|
||||||
|
"metrics": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue