-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goto definition for nixos options #265
Comments
This is already implemented in #93 ? |
Yes, you're right; I missed that one. I think you may be able to use the declarationPositions attribute for a more direct way of getting to the attribute location which would be more reliable in certain cases (but falls over in different cases). |
I just carefully read your PR looks like we can have line & column information by eval
The real challenge about options is, we cannot easily find out the attrpath where the user clicked. For now we have a slightly modified parser on the main branch, but that discards necessary information after parsing (that's why we have #257 and cannot be trivially merged). |
Since my PR NixOS/nixpkgs#249243 has been merged, we have non-garbage character level position information for about 90% of nixos options available under options.OPTION.declarationPositions, in the format of unsafeGetAttrPos.
This could, at least theoretically, form the basis of goto definition on nixos options. I expect this may have similar challenges to implement as #174, namely, figuring out what the actual option name is, but once those are resolved, this should be very possible.
The text was updated successfully, but these errors were encountered: