Skip to content

Commit

Permalink
Track zed settings
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Aug 19, 2024
1 parent f7c74fc commit f530f53
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
1 change: 1 addition & 0 deletions home/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ in {
./wallpaper.nix
./wezterm.nix
./wireshark.nix
./zed.nix
./zellij.nix
./zoxide.nix
./zsh.nix
Expand Down
7 changes: 7 additions & 0 deletions home/zed.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ ... }:
{
xdg.configFile = {
"zed/settings.json".source = ./zed/settings.json;
"zed/keymap.json".source = ./zed/keymap.json;
};
}
52 changes: 52 additions & 0 deletions home/zed/keymap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// 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.
[
{
"context": "Workspace",
"bindings": {
"cmd-k": [
"projects::OpenRecent",
{
"create_new_window": false
}
]
}
},
{
"context": "Editor",
"bindings": {
// "j k": ["workspace::SendKeystrokes", "escape"]
}
},
// vim normal mode
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"space f": "file_finder::Toggle",
"space [": "editor::GoToPrevDiagnostic",
"space ]": "editor::GoToDiagnostic",
"g b": "tab_switcher::Toggle",
"space t": "terminal_panel::ToggleFocus",
"space space": "workspace::NewSearch"
}
},
// vim visual mode
{
"context": "Editor && vim_mode == visual && !VimWaiting && !VimObject",
"bindings": {}
},
{
"context": "Dock || Terminal || Editor",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
}
}
]
70 changes: 70 additions & 0 deletions home/zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"theme": "Catppuccin Macchiato - No Italics",
"buffer_font_family": "JetBrainsMono Nerd Font",
"buffer_font_weight": 700,
"buffer_font_size": 14,
"buffer_font_features": {
// disable ligatures
"calt": false
},
"vim_mode": true,
"vim": {
"use_smartcase_find": true,
"use_multiline_find": true,
"use_system_clipboard": "always"
},
"features": {
"copilot": false
},
"cursor_blink": false,
"use_autoclose": false,
"show_copilot_suggestions": false,
"gutter": {
"line_numbers": true,
"folds": false
},
"relative_line_numbers": true,
"scrollbar": { "show": "never" },
"toolbar": {
"quick_actions": false
},
"terminal": {
"detect_venv": "off"
},
"tab_bar": {
"show": false
},
"assistant": {
"version": "2",
"enabled": false
},
"telemetry": {
"diagnostics": false,
"metrics": false
},
"git": {
"inline_blame": {
"enabled": false
}
},
"lsp": {
"pyright": {
"settings": {}
},
"rust-analyzer": {
"initialization_options": {
"checkOnSave": {
"command": "clippy"
}
}
}
}
}

0 comments on commit f530f53

Please sign in to comment.