Skip to content

Conversation

@not-my-profile
Copy link
Contributor

In NixOS modules options can be defined at the top-level, e.g:

{ foo = true; }

or inside of config, e.g:

{ config = { foo = true; }; }

Autocompletion and hover information before only worked for the former because the option resolving code had no special handling for config.

Fixes #566.

@not-my-profile not-my-profile force-pushed the complete-config branch 2 times, most recently from 1440b5f to 2fc14e8 Compare April 27, 2025 14:09
@not-my-profile not-my-profile changed the title libnixt: enable autocomplete and hover info in config sets nixd: enable autocomplete and hover info in config sets Apr 27, 2025
@not-my-profile not-my-profile changed the title nixd: enable autocomplete and hover info in config sets nixd: enable completion and hover in config sets Apr 27, 2025
Copy link
Member

@inclyc inclyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach LGTM, I left some comments just for nit picking.

In NixOS modules options can be defined at the top-level, e.g:

    { foo = true; }

or inside of `config`, e.g:

    { config = { foo = true; }; }

Autocompletion and hover information before only worked for the former
because the option resolving code had no special handling for `config`.

Fixes nix-community#566.
@inclyc inclyc merged commit 4e103b9 into nix-community:main May 1, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete breaks in NixOS module with explicit config section

2 participants