mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 14:59:50 +00:00
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
bfdd9d89a7
### This pull request adds the following: - Missing mapping for the `yield` keyword. - Outline scheme for `describe`, `it` and `test` function_call_expressions (to support Pest runnable) - Pest runnable support - PHPUnit runnable support - Task for running selected PHP code. ## Queries explanations #### Query 1 (PHPUnit: Run specific method test): 1. Class is not abstract (because you cannot run tests from an abstract class) 2. Class has `Test` suffix 3. Method has public modifier(or no modifiers, default is public) 4. Method has `test` prefix #### Query 2 (PHPUnit: Run specific method test with `@test` annotation): 1. Class is not abstract (because you cannot run tests from an abstract class) 2. Class has `Test` suffix 3. Method has public modifier(or no modifiers, default is public) 4. Method has `@test` annotation #### Query 3 (PHPUnit: Run specific method test with `#[Test]` attribute): 1. Class is not abstract (because you cannot run tests from an abstract class) 2. Class has `Test` suffix 3. Method has public modifier(or no modifiers, default is public) 4. Method has `#[Test]` attribute #### Query 4 (PHPUnit: Run all tests inside the class): 1. Class is not abstract (because you cannot run tests from an abstract class) 2. Class has `Test` suffix #### Query 5 (Pest: Run function test) 1. Function expression has one of the following names: `describe`, `it` or `test` 2. Function expression first argument is a string ### **PHPUnit: Example for valid test class** <img width="549" alt="Screenshot 2024-05-08 at 10 41 34" src="https://github.com/zed-industries/zed/assets/62463826/e84269de-4f53-410b-b93b-713f9448dc79"> ### **PHPUnit: Example for invalid test class** All the methods should be ignored because you cannot run tests on an abstract class. <img width="608" alt="Screenshot 2024-05-07 at 22 28 57" src="https://github.com/zed-industries/zed/assets/62463826/8c6b3921-5266-4d88-ada5-5cd827bcf242"> ### **Pest: Example** https://github.com/zed-industries/zed/assets/62463826/bce133eb-0a6f-4ca2-9739-12d9169bb9d6 You should now see all your **Pest** tests inside the buffer symbols modal. ![Screenshot 2024-05-08 at 22 51 25](https://github.com/zed-industries/zed/assets/62463826/9c818b74-383c-45e5-9b41-8dec92759a14) Release Notes: - Added test runnable detection for PHP (PHPUnit & Pest). - Added task for running selected PHP code. - Added `describe`, `test` and `it` functions to buffer symbols, to support Pest runnable. - Added `yield` keyword to PHP keyword mapping. |
||
---|---|---|
.cargo | ||
.cloudflare | ||
.config | ||
.github | ||
.zed | ||
assets | ||
crates | ||
docs | ||
extensions | ||
script | ||
tooling/xtask | ||
.dockerignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
debug.plist | ||
docker-compose.sql | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE-AGPL | ||
LICENSE-APACHE | ||
LICENSE-GPL | ||
livekit.yaml | ||
Procfile | ||
README.md | ||
rust-toolchain.toml | ||
typos.toml |
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
You can download Zed today for macOS (v10.15+).
Support for additional platforms is on our roadmap:
- Linux (tracking issue)
- Windows (tracking issue)
- Web (tracking issue)
For macOS users, you can also install Zed using Homebrew:
brew install --cask zed
Alternatively, to install the Preview release:
brew install --cask zed@preview
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about
to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specified
error for a crate you've created? If so, addpublish = false
under[package]
in your crate's Cargo.toml. - Is the error
failed to satisfy license requirements
for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theaccepted
array inscript/licenses/zed-licenses.toml
. - Is
cargo-about
unable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml
, as specified in the cargo-about book.