chezmoi: reorganise repo

This commit is contained in:
js0ny 2025-09-27 15:28:09 +01:00
parent b391e03c87
commit 67a78879db
278 changed files with 102 additions and 182 deletions

View file

@ -0,0 +1,112 @@
// $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"]
"alt-e": "editor::AddSelectionAbove", // Insert Cursor Above
"alt-n": "editor::AddSelectionBelow" // Insert Cursor Below
}
},
{
"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::ActivatePreviousItem",
"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::SelectPreviousMatch",
"N": ["workspace::SendKeystrokes", "n n n n n"],
"E": ["workspace::SendKeystrokes", "e e e e e"],
"Y": ["workspace::SendKeystrokes", "y $"]
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"n": "menu::SelectNext",
"e": "menu::SelectPrevious",
"i": "project_panel::ExpandSelectedEntry",
"A": "project_panel::NewDirectory",
"a": "project_panel::NewFile",
"d": "project_panel::Delete"
}
}
]

View file

@ -0,0 +1,109 @@
// $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"
}
}
]

View file

@ -0,0 +1,63 @@
// $DOTFILES/tools/zed/settings.json
// Date: 2025-01-25
// Author: js0ny
// Description: Zed settings (jsonc)
// Location:
// GNU/Linux: ~/.config/zed/settings.json
// Windows: %APPDATA%\Zed\settings.json
// Linking: (link the whole directory)
// ln -sf $DOTFILES/tools/zed ~/.config/zed
//
// 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 `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"features": {
"edit_prediction_provider": "zed"
},
"outline_panel": {
"dock": "right"
},
"edit_predictions": {
"disabled_globs": ["*.bean", "*.env"],
// "mode": "eager_preview",
"copilot": {
"proxy": null,
"proxy_no_verify": null
}
},
"base_keymap": "VSCode",
"vim_mode": true,
"ui_font_size": 16,
"buffer_font_size": null,
"theme": {
"mode": "system",
"light": "Rosé Pine Dawn",
"dark": "Kanagawa Dragon"
},
"relative_line_numbers": true,
"buffer_font_family": "Maple Mono NF CN",
"remove_trailing_whitespace_on_save": true,
"assistant": {
"default_model": {
"provider": "copilot_chat",
"model": "claude-3-7-sonnet"
},
"version": "2"
},
"inlay_hints": {
"enabled": true,
"show_type_hints": true
},
"terminal": {
"env": {
"EDITOR": "zed --wait"
}
}
}

View file

@ -0,0 +1,28 @@
{
"main": {
"prefix": "main",
"body": [
"int main() {",
" $1",
" return 0;",
"}"
],
"description": "Main function with no arguments"
},
"mainn": {
"prefix": "mainn",
"body": [
"",
"int main(int argc, char *argv[]) {",
" $1",
" return 0;",
"}"
],
"description": "Main function with arguments"
},
"once": {
"prefix": "#once",
"body": ["#ifndef $1", "#define $1", "", "$2", "", "#endif"],
"description": "Include guard"
}
}

View file

@ -0,0 +1,27 @@
{
"src": {
"prefix": "src",
"body": ["#+begin_src $1", "$0", "#+end_src"],
"description": "Source code block"
},
"ex": {
"prefix": "ex",
"body": ["#+begin_example", "$0", "#+end_example"],
"description": "Example block"
},
"begin": {
"prefix": "begin",
"body": ["#+begin_$1", "$0", "#+end_$1"],
"description": "Begin block"
},
"【【": {
"prefix": "[[",
"body": ["[[$0]]"],
"description": "Chinese link"
},
"elisp": {
"prefix": "elisp",
"body": ["#+begin_src emacs-lisp :tangle yes", "$0", "#+end_src"],
"description": "Emacs Lisp code block"
}
}