-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Go To Definition does not work? #2402
Comments
See #2000 (comment) for thoughts on this and a possible workaround for you. Basically, there currently is no official API to do this in a meaningful way and without breaking most (I think) use-cases. |
@spahnke thank you, this somewhat works. I opened another issue because line/column is not respected from the DefinitionProvider. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was reading this issue (#291) as I was having the same problem. Essentially my DefinitionProvider calls monaco.editor.createModel with a uri and code and then returns this uri in the Location object. However, the editor won't switch to the newly created model. Go to Definition only works in peek definition.
I found this fix, which is quite impractical as I'm using TypeScript.
I also found this suggestion from @alexdima.
Last but not least, I saw what the Eclipse guys are doing with Theia. Pretty much manually adding the type definitions.
I was thinking the last several days what the most pragmatic and practical solution could be. Is this a bug in Monaco? If it's not a bug and we are required to extend the current services, can we get the type definitions, perhaps, in a separate package?
Context about my project: Static Monaco webpage running OmniSharp's roslyn backend (The C# extension for VS Code) in WebAssembly within a worker. The editor communicates directly with WebAssembly for every single provider available through the worker. It all works like magic, except "Go To Definition" :(
Edit: I'm specifically talking about intermodel "Go To Definition". The feature works very well if the definition is within the the current model.
The text was updated successfully, but these errors were encountered: