621ac16e35dfb57346ff9262531e2b1d43010579
Closes #43730 ## Summary This modifies the existing injections.scm file for go by adding more specific prefix queries and *_content nodes to the existing `raw_string_literal` and `interpreted_string_literal` sections <details><summary>This PR</summary> <img width="567" height="784" alt="image" src="https://github.com/user-attachments/assets/bfe8c64e-1dc2-470c-9f85-2c664a6c5a15" /> <img width="383" height="909" alt="image" src="https://github.com/user-attachments/assets/9349af8c-22d3-4c9b-a435-a73719f17ba3" /> <img width="572" height="800" alt="image" src="https://github.com/user-attachments/assets/939ada3b-1440-443b-8492-0eb61a7ee90f" /> </details> <details><summary>Current Release (0.214.7)</summary> <img width="569" height="777" alt="image" src="https://github.com/user-attachments/assets/e6fffe77-e4c6-48e3-9c6d-a140298225c5" /> <img width="381" height="896" alt="image" src="https://github.com/user-attachments/assets/bf107950-c33a-4603-90d3-2304bef0a4af" /> <img width="574" height="798" alt="image" src="https://github.com/user-attachments/assets/2c5e43e5-f101-4722-8f58-6b176ba950ca" /> </details> <details><summary>Code</summary> ```go func test_sql() { // const assignment const _ = /* sql */ "SELECT * FROM users" const _ = /* sql */ `SELECT id, name FROM products` // var assignment var _ = /* sql */ `SELECT id, name FROM products` var _ = /* sql */ "SELECT id, name FROM products" // := assignment test := /* sql */ "SELECT * FROM users" test2 := /* sql */ `SELECT * FROM users` println(test) println(test2) // = assignment _ = /* sql */ "SELECT * FROM users WHERE id = 1" _ = /* sql */ `SELECT * FROM users WHERE id = 1` // literal elements _ = testStruct{Field: /* sql */ "SELECT * FROM users"} _ = testStruct{Field: /* sql */ `SELECT * FROM users`} testFunc(/* sql */ "SELECT * FROM users") testFunc(/* sql */ `SELECT * FROM users`) const backtickString = /* sql */ `SELECT * FROM users;` const quotedString = /* sql */ "SELECT * FROM users;" const backtickStringNoHighlight = `SELECT * FROM users;` const quotedStringNoHighlight = "SELECT * FROM users;" } func test_yaml() { // const assignment const _ = /* yaml */ ` settings: enabled: true port: 8080 ` // := assignment test := /* yaml */ ` settings: enabled: true port: 8080 ` println(test) // = assignment _ = /* yaml */ ` settings: enabled: true port: 8080 ` // literal elements in a struct _ = testStruct{Field: /* yaml */ ` settings: test: 1234 port: 8080 `} // function argument testFunc(/* yaml */ ` settings: enabled: true port: 8080 `) } func test_css() { // const assignment const _ = /* css */ "body { margin: 0; }" const _ = /* css */ `body { margin: 0; }` const cssCodes = /* css */ ` h1 { color: #333; } ` // := assignment test := /* css */ "body { margin: 0; }" println(test) // = assignment _ = /* css */ "body { margin: 0; }" _ = /* css */ `body { margin: 0; }` // literal elements _ = testStruct{Field: /* css */ "body { margin: 0; }"} _ = testStruct{Field: /* css */ `body { margin: 0; }`} testFunc(/* css */ "body { margin: 0; }") testFunc(/* css */ `body { margin: 0; }`) const backtickString = /* css */ `body { margin: 0; }` const quotedString = /* css */ "body { margin: 0; }" const backtickStringNoHighlight = `body { margin: 0; }` const quotedStringNoHighlight = "body { margin: 0; }" } ``` </details> Release Notes: - Greatly improved the quality of comment-directed language injections in Go
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
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 specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor 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 theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable 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.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%