Skip to content

Commit

Permalink
Chore: Add Zed editor tasks configuration
Browse files Browse the repository at this point in the history
This commit introduces a new Zed editor configuration file:

- Created .zed/tasks.json to define custom tasks for the project
- Added a "Setup Build Folder" task that:
  - Optionally cleans the existing build directory
  - Creates a new build directory
  - Runs CMake with the correct libigl path

- Included commented-out tasks for future use:
  - Compile and Run Project
  - Copy Staged Git Diff to Clipboard

These tasks streamline the development workflow in the Zed editor,
making it easier to set up the build environment and potentially
compile and run the project directly from the editor. The configuration
also allows for easy expansion with additional tasks in the future.
  • Loading branch information
G-structure committed Oct 16, 2024
1 parent 73ac9f2 commit 1cff484
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .zed/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
{
"label": "Setup Build Folder",
"command": "bash",
"args": [
"-c",
"if [ \"$1\" == \"--clean\" ] && [ -d build ]; then rm -rf build; fi; mkdir build; cd build; cmake -DFETCHCONTENT_SOURCE_DIR_LIBIGL=${ZED_WORKTREE_ROOT}/../libigl ../"
],
"cwd": "${ZED_WORKTREE_ROOT}",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
"shell": "system",
"args": ["--clean"]
}
// {
// "label": "Compile and Run Project",
// "command": "bash",
// "args": ["-c", "cd build && make && ./crochet"],
// "cwd": "${ZED_WORKTREE_ROOT}",
// "use_new_terminal": false,
// "allow_concurrent_runs": false,
// "reveal": "always",
// "hide": "never",
// "shell": "system"
// },
// {
// "label": "Copy Staged Git Diff to Clipboard",
// "command": "git diff --cached | xclip -selection clipboard",
// "env": {},
// "cwd": "${ZED_WORKTREE_ROOT}",
// "use_new_terminal": false,
// "allow_concurrent_runs": false,
// "reveal": "always",
// "hide": "never",
// "shell": "system"
// }
]

0 comments on commit 1cff484

Please sign in to comment.