HackerTrans
TopNewTrendsCommentsPastAskShowJobs

maxbrunsfeld

no profile record

Submissions

Extensible Language Support in Zed

zed.dev
14 points·by maxbrunsfeld·2 ปีที่แล้ว·0 comments

comments

maxbrunsfeld
·3 เดือนที่ผ่านมา·discuss
Yes
maxbrunsfeld
·3 เดือนที่ผ่านมา·discuss
In the new layout, the project panel and git panel are just moved to the right side, so that the agent panel could be on the left, and you could still view both at the same time.
maxbrunsfeld
·8 เดือนที่ผ่านมา·discuss
Curious about the failure to detect FS changes made outside of Zed. Are you on Linux?
maxbrunsfeld
·8 เดือนที่ผ่านมา·discuss
Agreed, we should support this!
maxbrunsfeld
·11 เดือนที่ผ่านมา·discuss
The Zed spirit is definitely to prefer a platform native solution.

You're right that we may be able to get rid of our WGSL implementation, and instead use the HLSL one via SPIR-V. But also, at some point we plan to port Zed to run in a web browser, and will likely build on WebGPU, where WGSL is the native shading language. Honestly, we don't change our graphics primitives that frequently, so the cost of having the three implementations going forward isn't that terrible. We definitely would not use MoltenVK on macOS, vs just using Metal directly.

Good point that we should publish a symbol server.
maxbrunsfeld
·ปีที่แล้ว·discuss
The fix shipped in Zed 0.185.12.
maxbrunsfeld
·ปีที่แล้ว·discuss
Isaac, that email that you sent to us (long after your internship ended) when Wasmtime first landed support for the WASM Component model was actually very helpful! We were considering going down the path of embedding V8 and doing JS extensions. I'm really glad we ended up going all in on Wasmtime and components; it's an awesome technology.
maxbrunsfeld
·ปีที่แล้ว·discuss
You can still include Text Threads as context in the inline assist prompt with @thread "name of thread", or using the `+` button. And it should suggest the active text thread for you, so it's one click. Let us know if that isn't working, we wanted to preserve the old workflow (very explicit context curation) for people who enjoyed previous assistant panel.
maxbrunsfeld
·ปีที่แล้ว·discuss
I believe this PR fixes the issue: https://github.com/zed-industries/zed/pull/30178.
maxbrunsfeld
·ปีที่แล้ว·discuss
Thanks for the information. We can reproduce this using Copilot Chat. We're fixing now. We'll let you know when the fix is out.
maxbrunsfeld
·ปีที่แล้ว·discuss
Yeah, we plan to revisit the collaboration features; it was painful but we decided we needed to pause work on it while we built out some more highly-requested functionality. We still have big plans for improving team collaboration!
maxbrunsfeld
·ปีที่แล้ว·discuss
Some things are just much faster in an editor.

I used `git add -p` until very recently (basically, until we built this feature in Zed). If you're using `add -p` and you notice a problem that you want to fix before committing, you need to go find that same bit of code in your editor, edit the code, then re-start your `add -p`. If you had chosen not to stage some preceding hunks, you need to skip over those again. Also, an editor can just render code much more readably than the git CLI can.
maxbrunsfeld
·ปีที่แล้ว·discuss
Just to clarify, you can run as many LSPs in a given file type as you want.

Common features like completions, diagnostics, and auto-formatting will multiplex to all of the LSPs.

Admittedly, there are certain features that currently only use one LSP: inlay hints and document highlights are examples. For which LSP features is multi-server support important to you? It shouldn't be too hard to generalize.
maxbrunsfeld
·ปีที่แล้ว·discuss
You can. This is fully supported.
maxbrunsfeld
·ปีที่แล้ว·discuss
There are extensions for scheme and racket: - https://zed.dev/extensions?query=scheme - https://zed.dev/extensions?query=racket
maxbrunsfeld
·2 ปีที่แล้ว·discuss
I had the same question. I would think that with rust’s Vec, no allocation would occur at steady state. Vec does not automatically resize when removing elements.
maxbrunsfeld
·2 ปีที่แล้ว·discuss
As a point of clarification, the script does not edit your zshrc file, it just prints a suggested edit that you may want to make to that file in order to add zed to your PATH.
maxbrunsfeld
·2 ปีที่แล้ว·discuss
If this happens with Zed 0.129 or later, could you open an issue? We had a problem at one point where there was a delay in macOS verifying our app’s code signature because we weren’t attaching the code signature correctly.
maxbrunsfeld
·2 ปีที่แล้ว·discuss
> It has created a culture in which checking in enormous generates files is common.

You're not required to do that, and never have been. We're going to move the grammars away from checking the generated `parser.c` in, but early in the project, it was a pretty pragmatic solution, given that many consumers of the grammars weren't using a particular package registry like NPM or crates.io.

> It abdicates common and important features in popular languages like significant whitespace to error-prone external scanners.

External scanners are the right tool for this. Nobody has proposed a better solution for this that actually works, and I don't think there is one, because every programming language with significant implements it differently.

> The GLR algorithm sometimes fails inexplicably and is essentially impossible to debug (not sure if the bugs are in the algorithm or the implementation)

It sounds like you personally have had trouble with debugging a grammar you've tried to develop, but it solves a problem.

> It bizarrely uses rust and node.

Tree-sitter isn't very coupled to node. We just shell out to a JS engine because we use JS (the most popular programming language, period) as a grammar DSL, rather than inventing our own language. Node is the most common one.

> the generated c files are insanely (probably a consequence of the GLR algorithm)

No, it's not because of GLR. A lot of the reason for the C code size is that we want to generate nice, readable, multi-line C expressions to represent data structures like parse tables, rather than encoding it in some cryptic, unreadable way. Also, incremental parsing requires that a bit more data be present in the parse table than would be required for a batch-only parser. What really matters is the code size of the final binaries. The generated `.so` or `.wasm` files for a Python parser are 503k, and 465k, respectively. The wasm gzips down to 69k. I would love to make it smaller, but there are pretty good reasons why it occupies the size that it does, and it's currently pretty manageable.

> It also uses (unless it's been updated in the last six months) a terrible algorithm for unicode lexing.

I'm not sure what you're referring to here. UTF8 and UTF16 are decoded into code points using standard routines from `libicu`.
maxbrunsfeld
·2 ปีที่แล้ว·discuss
Did you open an issue for the segfault you got, on the Tree-sitter repo or the repo for the particular parser you were using?

It's not really accurate to say that Tree-sitter segfaults constantly. The Tree-sitter CI performs randomized fuzz testing based on a bunch of popular grammars, randomly mutating entries from their test corpus. If you have a reproduction case for the segfault, it'd be useful to report.

Since you mention NPM, it sounds like you may be talking about a segfault that's specific to the Tree-sitter Node.js bindings, but it's hard to be sure.