void/CONTRIBUTING.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

156 lines
6.6 KiB
Markdown
Raw Normal View History

2024-09-17 22:30:08 +00:00
# Contributing to Void
Welcome! 👋 This is a guide on how to contribute to Void. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
There are two main ways to contribute:
2024-10-05 05:26:24 +00:00
- Suggest New Features ([discord](https://discord.gg/RSNjgaugJs))
2024-09-19 17:07:15 +00:00
- Build New Features ([project](https://github.com/orgs/voideditor/projects/2/views/3))
2024-09-17 22:30:08 +00:00
We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of Void's functionality. Scroll down to see 1. How to build/contribute to the Extension, or 2. How to build/contribute to the full IDE (for more native changes).
2024-09-17 22:30:08 +00:00
For some useful links we've compiled see [`VOID_USEFUL_LINKS.md`](https://github.com/voideditor/void/blob/main/VOID_USEFUL_LINKS.md).
2024-09-17 22:28:25 +00:00
## 1. Building the Extension
2024-09-24 04:46:08 +00:00
Here's how you can start contributing to the Void extension. This is where you should get started if you're new.
2024-09-17 22:28:25 +00:00
2024-09-17 23:34:23 +00:00
1. Clone the repository:
```
git clone https://github.com/voideditor/void
```
2024-10-23 07:49:33 +00:00
2. Open the folder `/extensions/void` in VSCode (open it in a new workspace, *don't* just cd into it):
2024-09-17 23:34:23 +00:00
```
2024-10-23 07:49:33 +00:00
open /extensions/void in vscode
2024-09-17 23:34:23 +00:00
```
3. Install dependencies:
```
npm install
```
4. Build the project. We created this build command so that we could run React in vscode - it converts `sidebar/index.tsx` into a CSS/JS bundle in `dist/`.
```
npm run build
```
5. Run the project by pressing <kbd>F5</kbd>.
2024-10-23 07:49:33 +00:00
This will start a new instance of VSCode with the extension enabled. If this doesn't work, you can press <kbd>Ctrl+Shift+P</kbd>, select "Debug: Start Debugging", and select "VSCode Extension Development".
2024-09-17 22:28:25 +00:00
2024-09-17 22:39:34 +00:00
2024-09-17 22:28:25 +00:00
## 2. Building the full IDE
If you want to work on the full IDE, please follow the steps below. If you have any questions/issues, you can refer to VSCode's full [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page, which is where the steps below come from. Also feel free to submit an issue or get in touch with us with any build errors.
2024-10-23 07:49:33 +00:00
### a. Building on a Mac
2024-09-17 22:28:25 +00:00
2024-10-23 08:48:39 +00:00
To build on a Mac, open `void/` in VSCode. Make sure you've built the extension by following the steps above (or just run `cd ./extensions/void && npm run build && npm run compile && cd ../..`). Also make sure you have Python and XCode installed on your system (you probably do by default).
2024-09-17 23:34:23 +00:00
2024-09-19 18:04:04 +00:00
1. Install all dependencies.
2024-09-17 23:34:23 +00:00
```
npm install
2024-09-17 23:34:23 +00:00
```
2024-10-23 07:49:33 +00:00
2. Run `npm run watch`.
This can take ~5 min. It's done when you see something like:
```
[watch-extensions] [00:37:39] Finished compilation extensions with 0 errors after 19303 ms
[watch-client ] [00:38:06] Finished compilation with 0 errors after 46248 ms
[watch-client ] [00:38:07] Starting compilation...
[watch-client ] [00:38:07] Finished compilation with 0 errors after 5 ms
```
2024-09-17 23:34:23 +00:00
2024-10-23 07:49:33 +00:00
<!-- 3. Press <kbd>Ctrl+Shift+B</kbd> to start the build process. -->
3. In a new terminal, run `./scripts/code.sh`.
2024-09-17 23:34:23 +00:00
This should open up the built IDE after loading for some time. To see new changes without restarting the build, use <kbd>Ctrl+Shift+P</kbd> and run "Reload Window".
2024-09-17 22:28:25 +00:00
To bundle the IDE, run `npm run gulp vscode-darwin-arm64`. Here are the full options: `vscode-{win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm}(-min)`
2024-09-17 22:28:25 +00:00
2024-09-17 22:40:05 +00:00
Now that you're set up, feel free to check out our [Issues](https://github.com/voideditor/void/issues) page!
2024-09-17 22:39:34 +00:00
2024-09-11 03:55:03 +00:00
2024-10-23 07:49:33 +00:00
**Common Fixes:**
2024-09-11 03:55:03 +00:00
2024-10-23 07:49:33 +00:00
- Make sure you have the same NodeJS version as `.nvmrc`.
2024-09-11 08:38:54 +00:00
2024-09-12 15:39:16 +00:00
2024-10-23 07:49:33 +00:00
### b. Building on Windows
2024-09-11 03:55:03 +00:00
2024-10-23 07:49:33 +00:00
To build on Windows, please refer to [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute). We recommend building on Mac; we're Windows users who switch to Mac to build right now.
If you're on Windows, we recommend running the project inside a dev container. VSCode should prompt you to do this automatically.
2024-09-11 08:38:54 +00:00
2024-10-23 07:49:33 +00:00
## Roadmap
2024-09-11 08:38:54 +00:00
2024-10-23 07:49:33 +00:00
Here are the most important topics on our Roadmap. More ⭐'s = more important.
2024-10-23 07:49:33 +00:00
These sometimes get outdated - please refer to our Issues page for the latest issues.
2024-09-11 08:38:54 +00:00
2024-10-23 07:49:33 +00:00
## ⭐⭐⭐ Make History work well.
2024-09-11 06:11:55 +00:00
2024-10-23 07:49:33 +00:00
When the user submits a response or presses the apply/accept/reject button, we should add these events to the history, allowing the user to undo/redo them. Right now there is unexpected behavior if the user tries to undo or redo their changes.
2024-09-11 06:11:55 +00:00
2024-10-23 07:49:33 +00:00
## ⭐⭐⭐ Build Cursor-style quick edits (ctrl+k).
2024-09-11 03:55:03 +00:00
2024-10-23 07:49:33 +00:00
When the user presses ctrl+k, an input box should appear inline with the code that they were selecting. This is somewhat difficult to do because an extension alone cannot do this, and it requires creating a new component in the IDE. We think you can modify vscode's built-in "codelens" or "zone widget" components, but we are open to alternatives.
2024-09-11 03:55:03 +00:00
2024-09-16 04:28:27 +00:00
## ⭐⭐⭐ Creative.
2024-09-11 13:27:22 +00:00
2024-10-23 07:49:33 +00:00
Examples: creating better code search, or supporting AI agents that can edit across files and make multiple LLM calls.
2024-09-12 04:17:49 +00:00
2024-09-16 04:29:09 +00:00
Eventually, we want to build a convenient API for creating AI tools. The API will provide methods for creating the UI (showing an autocomplete suggestion, or creating a new diff), detecting event changes (like `onKeystroke` or `onFileOpen`), and modifying the user's file-system (storing indexes associated with each file), making it much easier to make your own AI plugin. We plan on building these features further along in timeline, but we wanted to list them for completeness.
2024-09-12 05:56:01 +00:00
2024-09-17 20:30:40 +00:00
## ⭐ One-stars.
⭐ Let the user accept / reject all Diffs in an entire file via the sidebar.
2024-09-23 21:54:54 +00:00
# Guidelines
Please don't make big refactors without speaking with us first. We'd like to keep the codebase similar to vscode so we can periodically rebase, and if we have big changes that gets complicated.
2024-09-23 21:54:54 +00:00
2024-09-11 08:21:55 +00:00
# Submitting a Pull Request
2024-09-11 06:20:44 +00:00
2024-10-02 06:08:38 +00:00
Please submit a pull request once you've made a change. Here are a few guidelines:
2024-10-02 06:23:31 +00:00
- A PR should be about one *single* feature change. The fewer items you change, the more likely the PR is to be accepted.
2024-10-02 06:08:38 +00:00
2024-10-23 07:49:33 +00:00
- Your PR should contain a description that first explains at a high level what you did, and then describes the exact changes you made (and to which files). Please don't use vague statements like "refactored code" or "improved types" (instead, describe what code you refactored, or what types you changed).
2024-10-02 06:08:38 +00:00
2024-10-23 07:49:33 +00:00
- Try to avoid refactoring and making feature changes in the same PR.
2024-09-24 04:46:08 +00:00
# Relevant files
We keep track of all the files we've changed with Void so it's easy to rebase:
- README.md
- CONTRIBUTING.md
- VOID_USEFUL_LINKS.md
- product.json
- package.json
2024-09-24 04:46:08 +00:00
- src/vs/workbench/api/common/{extHost.api.impl.ts | extHostApiCommands.ts}
- src/vs/workbench/workbench.common.main.ts
2024-10-23 08:46:30 +00:00
- src/vs/workbench/contrib/void/*
- extensions/void/*
2024-09-24 04:46:08 +00:00
2024-10-23 08:46:30 +00:00
- .github/*
- .vscode/settings/*
2024-09-24 04:46:08 +00:00
- .eslintrc.json
- build/hygiene.js
- build/lib/i18n.resources.json
- build/npm/dirs.js
2024-10-23 08:46:30 +00:00
- vscode.proposed.editorInsets.d.ts - not modified, but code copied