-
Notifications
You must be signed in to change notification settings - Fork 167
RLS categorizes enums as arrays #140
Comments
I looked into this a little, and it looks like it the root cause is in the compiler's save-analysis (rust-lang/rust). Though the enum itself is being classified correctly as an |
@DSpeckhals Hey, thanks for looking into this! So the reason we classify it as a tuple is because there are three kinds of enum variants (with matching literal forms): tuple variants, struct variants, and unit variants. We try to make the kind in save-analysis reflect the kind of variant. We could just switch all three to have |
I think I like the second option better. Do you mind if we turn this into a tracking issue for implementing that? Here are the steps that I see so far:
|
Sounds good! You'll want to do the 3rd and 4th steps in the opposite order though. Note that there will be a bit of a dance to get the compiler and RLS to update their versions of rls-data. I think we might get away without doing this because transmuting from one version of the crate data to the other should still work. If you can compile the RLS locally after updating the version of rls-data in the rls, then you're good. If there is an error there, it is probably easier for me to get the changed version of rls-data into the compiler, since it requires changing multiple repositories 'at once'. |
@nrc After a little work, I can get the RLS to compile locally with rls-data master. However, there are some stipulations that I think you may be alluding at above:
What are the steps we should go about from here? From what I can tell, I think there has to be a new version of rls-data cut before opening PR's for rls-analysis and rls. |
Yeah, I think that sounds right, you'll need to send PRs to rls-analysis and then the RLS. I'm making a release of rls-data - 0.11.0 - with your changes. |
I am not sure if it is an issue of the extension or the RLS itself, however
@:
command (Go to Symbol in File by Category) places enums in thearray
category.The text was updated successfully, but these errors were encountered: