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

Expose the semanticdb messages as model markers #34

Closed
jonas opened this issue Jul 2, 2017 · 5 comments
Closed

Expose the semanticdb messages as model markers #34

jonas opened this issue Jul 2, 2017 · 5 comments

Comments

@jonas
Copy link
Collaborator

jonas commented Jul 2, 2017

Model markers provide a way to annotate the code with compiler warnings. Should probably be optional.

https://microsoft.github.io/monaco-editor/api/modules/monaco.editor.html#setmodelmarkers

editingevolved_errorsinline

@jonas jonas changed the title Optionally expose the semanticdb messages as model markers Expose the semanticdb messages as model markers Jul 2, 2017
@olafurpg
Copy link
Member

olafurpg commented Jul 2, 2017

The semanticdb includes messages reported by the compiler, see https://github.com/scalameta/scalameta/blob/f7463f78227e092b5dab0a05667733b0a2b23952/scalameta/semantic/shared/src/main/protobuf/semanticdb.proto#L12

We should probably call this method once when we create the model for the first time. In #33, models are created in MetadocTextModelService.

olafurpg added a commit that referenced this issue Jul 2, 2017
See #34. This currently only works in non-readonly mode. Hopefully, that
will change in future Monaco versions.
@olafurpg
Copy link
Member

olafurpg commented Jul 2, 2017

I managed to get this working!

screen shot 2017-07-02 at 20 34 07

The fix is here 90d3914 However, unfortuantely markers are not displayed in read-only mode, see microsoft/monaco-editor#311 I left a comment in that issue, maybe they're open to change the behavior or we can contribute a new option to escape this.

@jonas
Copy link
Collaborator Author

jonas commented Jul 2, 2017

It's a shame it doesn't work in read-only mode.

@olafurpg
Copy link
Member

Metadoc requires the sources to be compiled beforehand so we would only be able to report warnings. I think this is not an important use-case so I'd be happy to close this ticket. wdyt?

@jonas
Copy link
Collaborator Author

jonas commented Sep 28, 2018

Yes we can close it.

@jonas jonas closed this as completed Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants