Zed - another try.

This commit is contained in:
Bartek Stalewski 2024-10-14 21:04:16 +02:00
parent cae6099b95
commit 689a752a94
Signed by: ftpd
SSH Key Fingerprint: SHA256:vGQiaNJcfUMLt3wF58+Zx15C6SpRDA9spUeggjVY8Yo
4 changed files with 107 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,4 +1,7 @@
**/lazy-lock.json **/lazy-lock.json
**/.netrwhist **/.netrwhist
**/__pycache__ **/__pycache__
**/zed/.tmp*
**/zed/embeddings
**/zed/prompts
**/.zsh_history **/.zsh_history

21
config/zed/keymap.json Normal file
View File

@ -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"]
}
}
]

79
config/zed/settings.json Normal file
View File

@ -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,
}

View File

@ -49,6 +49,9 @@ elif [ $(command -v vim) ] ; then
else else
export EDITOR=vi export EDITOR=vi
fi fi
if [ $(command -v zed) ] && [ $(id -u) -ne 0 ]; then
alias vim=zed
fi
if [[ $(command -v rg) ]]; then if [[ $(command -v rg) ]]; then
alias grep='rg -i' alias grep='rg -i'
@ -72,4 +75,4 @@ function upgrade() {
rm -rf ~/Library/Caches/Homebrew/* rm -rf ~/Library/Caches/Homebrew/*
fi fi
oh-my-posh upgrade oh-my-posh upgrade
} }