nixd
                                
                                 nixd copied to clipboard
                                
                                    nixd copied to clipboard
                            
                            
                            
                        nixd/hover: hover documentation for nixpkgs functions
It might be useful if we can extract comments from nixpkgs, this need a slightly modified lexer.
https://github.com/nix-community/nixd/blob/3dbe1eb6bde1949b510e19a2d1863a2f4d2329a6/lib/nixd/src/nix/Lexer.l#L310
The comments are discarded directly in our lexer now, we need to preserve this information and a dedicated structure for comments.
Another problem is, the location information is not correct for a Currying lambda. e.g. stdenv.mkDerivation takes us to the location where the origin lambda defined, not "alias"-d location.
- RFC https://github.com/NixOS/rfcs/pull/145 specified the relationship between doc-comments and expressions.
- We have upstream PR that extract comments and can be used in :dochttps://github.com/NixOS/nix/pull/9054