Skip to content

rework nixd development tooling for dendritic pattern #32

@hyperparabolic

Description

@hyperparabolic

Manual configuration of nixd that includes auto-completion for modules can only specify one host for discovering options, and can only discover the modules that are actually imported on that specific host. Traditional patterns learn toward modules always being imported, and just enabling / disabling behavior with options, so this hasn't usually been an issue. However, optionally importing modules seems pretty core to convenient dendritic design patterns.

This isn't an issue yet, but eventually if I make options for modules that aren't imported on oak, nixd won't support option completion for those modules.

I think this can be solved by creating a dummy host that imports every module, and referencing that host as a part of your nixd config. This might get a little sticky if there are ever conflicting options in different modules, but lib.mkOverride should be able to take care of this, and I think it's a price worth paying for lsp support.

Mulling over this for a second to think about other alternatives that won't increase nix flake check evaluation time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions