nix-community / rnix-lsp

WIP Language Server for Nix! [maintainer=@aaronjanse]
MIT License
708 stars 41 forks source link

improved unbound identifier detection #95

Open symphorien opened 2 years ago

symphorien commented 2 years ago

followup to #88

parse all of rnix typed nodes so that unbound identifiers can be detected in much more cases

the evaluation machinery only returns unimplemented for the new nodes

image

at some point I ran rustfmt on the project by habit, I tried to undo some of the changes, but the diff is not minimal.

aaronjanse commented 2 years ago

@symphorien Would you mind if I merge in the ExprSources alongside an rnix-parser update in a separate PR? I'd put all your edits in a commit, with you marked as the author and me as the committer, so you'd get credit in the Github UI.

Updating rnix-parser would be easier with some of the definitions you added, like StringPartSource.

symphorien commented 2 years ago

Fine by me as long as it does not create extra merge conflicts, I have a branch with unused binding detection at https://github.com/symphorien/rnix-lsp/tree/unused and it's based on this branch. (will make a PR after some more testing)

symphorien commented 2 years ago

ping @aaronjanse