From 03f30d8e64f6c3817f5b35133d23d431172a0fa1 Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Tue, 8 Jul 2025 16:22:36 +0200 Subject: [PATCH] feat: minor improvements --- README.md | 9 +++++++++ keymap.json | 22 +++++++++++++++++----- settings.json | 16 +++++++++------- tasks.json | 25 ++++++++++++++++--------- tasks/preview-doc.sh | 5 ++++- 5 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 README.md mode change 100644 => 100755 tasks/preview-doc.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..f1692e0 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +## Deps + +### Preview docs + +- `fswatch`: + - `$ yay -S fswatch` + - `$ brew install fswatch` +- `surf`: lightweight browser + - `# port install surf` diff --git a/keymap.json b/keymap.json index bbfd2bb..9282e87 100644 --- a/keymap.json +++ b/keymap.json @@ -1,7 +1,7 @@ -// ╭───────────────────────────────╮ -// │- Zed editor keys │ -// │- author: Daniel Heras Quesada │ -// ╰───────────────────────────────╯ +// ╭────────────────────────────────╮ +// │- Zed editor keys -│ +// │- author: Daniel Heras Quesada -│ +// ╰────────────────────────────────╯ [ { "context": "Workspace", @@ -52,10 +52,20 @@ // ] } }, + { + "context": "OutlinePanel", + "bindings": { + "ctrl-a": "workspace::ToggleLeftDock", + "ctrl-n": "project_panel::ToggleFocus", + "ctrl-g": "git_panel::ToggleFocus" + } + }, { "context": "ProjectPanel", "bindings": { "ctrl-n": "workspace::ToggleLeftDock", + "ctrl-a": "outline_panel::ToggleFocus", + "ctrl-g": "git_panel::ToggleFocus", "f12": "project_panel::Rename", "shift-enter": "project_panel::OpenWithSystem", "/": "project_panel::NewSearchInDirectory" @@ -64,7 +74,9 @@ { "context": "GitPanel", "bindings": { - "ctrl-g": "workspace::ToggleLeftDock" + "ctrl-g": "workspace::ToggleLeftDock", + "ctrl-a": "outline_panel::ToggleFocus", + "ctrl-n": "project_panel::ToggleFocus" } }, { diff --git a/settings.json b/settings.json index 92d7d26..5e69630 100644 --- a/settings.json +++ b/settings.json @@ -1,14 +1,14 @@ -// ╭───────────────────────────────╮ -// │- Zed editor settings │ -// │- author: Daniel Heras Quesada │ -// ╰───────────────────────────────╯ +// ╭────────────────────────────────╮ +// │- Zed editor settings -│ +// │- author: Daniel Heras Quesada -│ +// ╰────────────────────────────────╯ { // ╭─────────╮ // │ General │ // ╰─────────╯ "auto_update": true, "base_keymap": "VSCode", - "restore_on_startup": "last_workspace", + "restore_on_startup": "last_session", // ╭─────────╮ // │ Styling │ // ╰─────────╯ @@ -99,7 +99,6 @@ "dock": "right", "default_width": 640, "default_height": 320, - "provider": "openai", "version": "2", "default_model": { "provider": "openai", @@ -135,7 +134,10 @@ "show_branch_name": true }, "minimap": { - "show": "never" + "show": "never", + "thumb": "always", + "thumb_border": "left_open", + "current_line_highlight": "all" }, "modal_max_width": "medium", "outline_panel": { diff --git a/tasks.json b/tasks.json index 09d0bb4..1f79c3d 100644 --- a/tasks.json +++ b/tasks.json @@ -1,7 +1,7 @@ -// ╭───────────────────────────────╮ -// │- Zed editor tasks │ -// │- author: Daniel Heras Quesada │ -// ╰───────────────────────────────╯ +// ╭────────────────────────────────╮ +// │- Zed editor tasks -│ +// │- author: Daniel Heras Quesada -│ +// ╰────────────────────────────────╯ [ { "label": "🚀 Build migrate", @@ -13,7 +13,7 @@ "shell": "system" }, { - "label": ":octocat: Commit Stradi", + "label": "👚 Commit Stradi", "command": "bash ~/.config/zed/tasks/commit-stradi.sh", "use_new_terminal": false, "allow_concurrent_runs": false, @@ -22,15 +22,13 @@ "shell": "system" }, { - "label": "Lazygit", + "label": "😴 Lazygit", "command": "lazygit", - "args": [], - "env": {}, "use_new_terminal": false, "allow_concurrent_runs": false }, { - "label": "Blueprints", + "label": "🐾 Blueprints", "command": "~/Packages/code-templates/code_templates", "use_new_terminal": true, "allow_concurrent_runs": false, @@ -38,4 +36,13 @@ "hide": "never", "shell": "system" } + // { + // "label": "📝 Preview document", + // "command": "bash ~/.config/zed/tasks/preview-doc.sh '$ZED_FILE'", + // "use_new_terminal": true, + // "allow_concurrent_runs": false, + // "reveal": "always", + // "hide": "never", + // "shell": "system" + // } ] diff --git a/tasks/preview-doc.sh b/tasks/preview-doc.sh old mode 100644 new mode 100755 index cb4c554..815af20 --- a/tasks/preview-doc.sh +++ b/tasks/preview-doc.sh @@ -1 +1,4 @@ -docs="$(ls -R . | grep "\.md")" +[[ $# -ne 1 ]] && exit 1; +FILE_NAME="md_preview_intex.html" +fswatch -0 "$1" | pandoc -f markdown $1 > $FILE_NAME && surf $FILE_NAME +rm $FILE_NAME