From 689a752a947bd44240b688bd83b33c3aed7a5650 Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Mon, 14 Oct 2024 21:04:16 +0200 Subject: [PATCH] Zed - another try. --- .gitignore | 3 ++ config/zed/keymap.json | 21 +++++++++++ config/zed/settings.json | 79 ++++++++++++++++++++++++++++++++++++++++ config/zsh/aliases.zsh | 5 ++- 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 config/zed/keymap.json create mode 100644 config/zed/settings.json diff --git a/.gitignore b/.gitignore index eb1e437..ab2d501 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ **/lazy-lock.json **/.netrwhist **/__pycache__ +**/zed/.tmp* +**/zed/embeddings +**/zed/prompts **/.zsh_history diff --git a/config/zed/keymap.json b/config/zed/keymap.json new file mode 100644 index 0000000..b824f8a --- /dev/null +++ b/config/zed/keymap.json @@ -0,0 +1,21 @@ +// 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": { + "escape enter": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }] + } + }, + { + "context": "Editor", + "bindings": { + // "j k": ["workspace::SendKeystrokes", "escape"] + } + } +] diff --git a/config/zed/settings.json b/config/zed/settings.json new file mode 100644 index 0000000..3cb3a68 --- /dev/null +++ b/config/zed/settings.json @@ -0,0 +1,79 @@ +{ + "assistant": { + "default_model": { + "provider": "copilot_chat", + "model": "gpt-4o" + }, + "enabled": false, + "button": false, + "version": "2" + }, + "buffer_font_family": "RobotoMono Nerd Font", + "buffer_font_size": 14, + "chat_panel": { + "button": false + }, + "collaboration_panel": { + "button": false + }, + "cursor_blink": false, + "ensure_final_newline_on_save": false, + "features": { + "inline_completion_provider": "none" + }, + "file_types": { + "YAML": ["gotmpl"] + }, + "format_on_save": "off", + "git": { + "inline_blame": { + "enabled": true + } + }, + "notification_panel": { + "button": false + }, + "outline_panel": { + "button": false + }, + "projects_online_by_default": false, + "remove_trailing_whitespace_on_save": true, + "show_call_status-icon": false, + "soft_wrap": "editor_width", + "tabs": { + "file_icons": true, + "git_status": true + }, + "tab_bar": { + "show_nav_history_buttons": false + }, + "telemetry": { + "diagnostics": false, + "metrics": false + }, + "terminal": { + "blinking": "off", + "button": false, + "copy_on_select": true, + "font_family": "RobotoMono Nerd Font", + "font_size": 14, + "toolbar": { + "title": false + }, + "working_directory": "first_project_directory" + }, + "theme": { + "dark": "Ayu Dark", + "light": "Ayu Light", + "mode": "system" + }, + "toolbar": { + "breadcrumbs": false, + "quick_actions": false + }, + "vim_mode": true, + "vim":{ + "use_system_clipboard": "never" + }, + "ui_font_size": 16, +} \ No newline at end of file diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 58d3ef3..6dd3b68 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -49,6 +49,9 @@ elif [ $(command -v vim) ] ; then else export EDITOR=vi fi +if [ $(command -v zed) ] && [ $(id -u) -ne 0 ]; then + alias vim=zed +fi if [[ $(command -v rg) ]]; then alias grep='rg -i' @@ -72,4 +75,4 @@ function upgrade() { rm -rf ~/Library/Caches/Homebrew/* fi oh-my-posh upgrade -} +} \ No newline at end of file