zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.13k stars 2.71k forks source link

feat: avoid nodejs whenever possible by switching to a natively built LSP for most common file types #14438

Open ryuukk opened 2 months ago

ryuukk commented 2 months ago

Check for existing issues

Describe the feature

Using Zed feels great, however seeing nodejs randomly being spawned only because you opened a json file makes it loose its charm and breaks the promise of a low memory footprint editor

I suggest using a natively built LSP whenever possible for most common files

I suggest: https://github.com/biomejs/biome for js/json etc

If applicable, add mockups / screenshots to help present your vision of the feature

No response

trivikr commented 3 weeks ago

I didn't understand this issue. Where does Node.js get spawned on opening a JSON file?

bbb651 commented 1 week ago

The default LSP for json used in Zed is vscode-langservers-extracted (I think the docs are outdated, they say it's using json-language-server), which as the name implies are extracted from vscode and written in javascript (well typescript). Every time you open a json file they are launched in NodeJS.

I tried the biome extension and it works pretty well for json, except it seems to entirely ignore LSP configuration for schemas, and as such settings.json has no completion.

If you want to try it out, install it and add this to your settings.json:

    "languages": {
        "JSON": {
            "language_servers": ["biome"]
        },
        "JSONC": {
            "language_servers": ["biome"]
        }
    },