VS Code extension "Goto Definition" for Cap'n Proto schema #2124
Replies: 8 comments 5 replies
-
|
I've always wanted to do this! I agree that it would be ideal if we can use the canonical parser implementation for this, but that it doesn't provide all the information needed today. There's some partial support for tracking code locations but the information doesn't make its way all the way through the compiler. I'd love to work on this but realistically I don't expect to have time anytime soon. If you'd like to take a shot at it, feel free. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your reply. Does this approach look correct to you? |
Beta Was this translation helpful? Give feedback.
-
|
I have made a trial Pull Request for the changes to retain the position of declaration statements. |
Beta Was this translation helpful? Give feedback.
-
|
@trickstar0301 Have you considered contributing to @norgor VS Code extension vscode-capnp which seems to be the most recent and feature rich? |
Beta Was this translation helpful? Give feedback.
-
|
@JonathanPlasse |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. That’s really encouraging! |
Beta Was this translation helpful? Give feedback.
-
|
@kentonv The implementation relies heavily on Would you be open to discussing whether this could become part of the official Cap'n Proto repository? I believe it could greatly enhance the developer experience for users working with Cap'n Proto schemas. @norgor |
Beta Was this translation helpful? Give feedback.
-
|
Hi @kentonv, I hope you're doing well. I wanted to gently follow up regarding my language server, which adds features like definition jumping and symbol analysis. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a VS Code extension for definition jumping, but I'm unable to get the declaration position(file, line, column) from parsedSchema.
I suggest adding a new member to Node to reserve the declaration position, like this:
Additionally, I suggest exposing a way for library users to retrieve this information.
This would make it easier to retrieve the field's declaration position, improving integration with tools like VS Code.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions