Skip to content
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

Jump to definition for RIot.js components is not working #13

Open
GianlucaGuarini opened this issue Dec 6, 2024 · 6 comments
Open

Jump to definition for RIot.js components is not working #13

GianlucaGuarini opened this issue Dec 6, 2024 · 6 comments
Assignees

Comments

@GianlucaGuarini
Copy link
Contributor

I am not sure if this issue is related to #9 but the components jump to definition doesn't work. For example:

<my-component>
  <child/> <!-- I expect the jump to definition here to jump to child.riot -->

  <script>
    // jump to definition here doesn't work here either
    import Child from './child.riot'

    export default {
      components: { Child }
    }
  </script>
</my-component>
@Kal-Aster
Copy link
Owner

<!-- I expect the jump to definition here to jump to child.riot -->
This one isn't actually implemented.

// jump to definition here doesn't work here either
This one should work, I'll check it out as soon as possible.

@Kal-Aster Kal-Aster self-assigned this Dec 11, 2024
@Kal-Aster
Copy link
Owner

The extension indeed don't work sometimes and I'm trying to find the issue, but in my setup it wasn't consistent.

Did the jump to definition feature never worked for you?
Is the code you shared that you've tested the extension on?

@GianlucaGuarini
Copy link
Contributor Author

Did the jump to definition feature never worked for you?

Yes it did work in intellij https://plugins.jetbrains.com/plugin/12748-riot-js

Is the code you shared that you've tested the extension on?

Yes basically you can take any of the components inside the riot/test folder from the official riot repo
Please check this video, the jump to definition works only within the script tag to the import definition. If I want to jump to the imported file from the import statement or from the html it doesn't work

Screen.Recording.2024-12-21.at.00.33.27.mov

@Kal-Aster
Copy link
Owner

I see... That's actually not my extension 😅 This one is.
I made it only for VSCode, for now.

However I tested working in some projects of mine and I noticed that after some time the extension breaks, especially when opening or closing many times multiple riot documents... So for sure there are many optimisations to do, but meanwhile if you can try it on VSCode.

@Kal-Aster
Copy link
Owner

However I tested working in some projects of mine and I noticed that after some time the extension breaks, especially when opening or closing many times multiple riot documents... So for sure there are many optimisations to do, but meanwhile if you can try it on VSCode.

Actually the problem was in the autoclose feature. I fixed it and now it should work consistently.

@GianlucaGuarini
Copy link
Contributor Author

I have tested it in VsCode as well and it doesn't seem to work:

Screenshot 2025-01-03 at 23 30 04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants