zed-extensions / nix

Nix language support in Zed
MIT License
24 stars 10 forks source link

Add support for nil language server #13

Open matubu opened 1 month ago

matubu commented 1 month ago

Closes #9 Supersedes #7

Configure Nixd

Options: https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md

Example: settings.json

{
    "lsp": {
        "nixd": {
            "settings": {
                "diagnostic": {
                    "suppress": [ "sema-extra-with" ]
                }
            }
        }
    }
}

Configure Nil

Options: https://github.com/oxalica/nil/blob/main/docs/configuration.md

Example: settings.json

{
    "lsp": {
        "nil": {
            "settings": {
                "diagnostics": {
                    "ignored": [ "unused_binding" ]
                }
            }
        }
    }
}

Only use Nixd

settings.json

{
    "languages": {
        "Nix": {
            "language_servers": [ "nixd", "!nil" ],
        }
    }
}

Only use Nil

settings.json

{
    "languages": {
        "Nix": {
            "language_servers": [ "nil", "!nixd" ],
        }
    }
}
SirWalross commented 1 week ago

Could you get this merged? I would really like to use nil as the lsp.

misuzu commented 1 week ago

@maxdeviant could you please take a look?