Add navigation/find usages/completion support for Nix paths#45
Add navigation/find usages/completion support for Nix paths#45kef wants to merge 1 commit intoNixOS:masterfrom
Conversation
JojOatXGME
left a comment
There was a problem hiding this comment.
First, thanks for your contribution. Here is my initial review.
I would appreciate if you could also write some basic test, if possible.
Maybe this might help https://plugins.jetbrains.com/docs/intellij/writing-tests-for-plugins.html.
| psiElement(NixStringText.class) | ||
| .withText(string().matches(NIX_PATH_REGEX)) |
There was a problem hiding this comment.
I currently don't quite understand how this is working. How does this code associate which files match against which strings or paths? The sting might also contain escape sequences, shouldn't we have to parse them somewhere?
| string_text ::= STR | IND_STR | ||
| { | ||
| mixin="org.nixos.idea.psi.impl.NixStringReferencingElementImpl" | ||
| } |
There was a problem hiding this comment.
Can you provide some rationale why you are putting the mixin at string_text, not string? One string might contain multiple string_text elements, couldn't this be a problem? I fear that the current implementation would work for ./ in ''hi ''$./'', but not in ''*hi ./''. (I think we should probably detect neither of these cases, and only match against the whole string.)
There was a problem hiding this comment.
Hi I am in good hands I just need some money I am going back in tomorrow and I'm trying my luck and I'm not even trying
What kind of error do we get? Is it possible that we catch the error and provide some more meaningful error message for the user? |
default.nixfile offer that file as an optional destination.Note that rename for path components is partially working but gets an error. This needs more work, but doesn't impact on the other new features.