Skip to content

Jump to declaration for nixos module config attributes #599

Open
@Atemu

Description

@Atemu

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

nixd is able to jump to NixOS option declarations from the point they're set but not the points where their value is read using the config argument.

Describe the solution you'd like
A clear and concise description of what you want to happen.

It'd be great if nixd could also jump to option declarations from config.option.name.here

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

-

Additional context
Add any other context or screenshots about the feature request here.

It's common for config attributes to be put into another variable via let:

{ config, ... }:

let
  cfg = config.foo.bar;
in
{
  bar.foo = cfg.baz;
}

nixd should be able to resolve this redirection and jump to the declaration of options.foo.bar.baz when attempting to jump to the declaration of cfg.baz.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions