When the language server doesn't provide a resolve option, return the original codelens - #46
Merged
Merged
Conversation
…original code lens In browser test shown that monaco still call the resolver in all cases, so we can't use undefined.
akosyakov
reviewed
Jan 31, 2018
| const protocolCodeLens = this.m2p.asCodeLens(codeLens); | ||
| return provider.resolveCodeLens!(protocolCodeLens, token).then(result => this.p2m.asCodeLens(result)) | ||
| } : undefined | ||
| } : ((m, codeLens, t) => codeLens) |
Contributor
There was a problem hiding this comment.
Are you sure that it is necessary? resolveCodeLens is optional, I assume monaco does it automatically
Author
There was a problem hiding this comment.
It looks like their is a bug on their side, but I'm not optimistic about the turnaround time, I'll look after making a pull request for them too, from the compiled editor.main.js (line 90163):
var promises = toResolve.map(function (request, i) {
var resolvedSymbols = new Array(request.length);
var promises = request.map(function (request, i) {
return async_1.asWinJsPromise(function (token) {
return request.provider.resolveCodeLens(model, request.symbol, token);
}).then(function (symbol) {
resolvedSymbols[i] = symbol;
});
});
return winjs_base_1.TPromise.join(promises).then(function () {
lenses[i].updateCommands(resolvedSymbols);
});
});No care taken for the optionsal resolveCodeLens
Contributor
There was a problem hiding this comment.
looks like you are right, please file an issue for monaco-editor as well
akosyakov
approved these changes
Jan 31, 2018
Contributor
|
@Twinside thank you |
Author
|
Oh, you already filled a ticket: microsoft/monaco-editor#576 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In browser test shown that monaco still call the resolver in all cases,
so we can't use undefined here.
Thanks for the library :)