Replies: 14 comments
-
I don't believe 3 is currently doable. But from reading the code here -- https://github.com/microsoft/vscode/blob/8758dc9dddf95f358eb93c969353e5cf245ed1e4/src/vs/editor/contrib/suggest/suggest.ts#L180-L181 -- I can deduce that the word completion provider is in a different group than the custom completion provider and once you return a result, the process stops and it doesn't get invoked. I could not figure out what creates the grouping, but I can see here -- https://github.com/microsoft/vscode/blob/8758dc9dddf95f358eb93c969353e5cf245ed1e4/src/vs/editor/common/services/editorWorkerServiceImpl.ts#L76 -- that the word completion provider is registered with You could potentially try to register your completion provider with |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help. I will look into this. |
Beta Was this translation helpful? Give feedback.
-
hi, akshay-zz, did you find any ways to solve this problem? |
Beta Was this translation helpful? Give feedback.
-
I meet this same problem in my project!wish your repley, thx! |
Beta Was this translation helpful? Give feedback.
-
Right now I'm not working into this. But soon will try to achieve this as per hint given by @alexdima . |
Beta Was this translation helpful? Give feedback.
-
I think something like this could help. I haven't tested the else part. Right now I'm not working on this. But if someone can try to achieve this and share with us, then that would be great. Even thought this trick does not satisfy third case completely. But I think this will help and by doing little work around by summing up word suggestion and server suggestion we can achieve the third case.
Haven't tested else part and quite sure will fail. Just added to give a approach if anyone love to work on this. Else part code is taken from here |
Beta Was this translation helpful? Give feedback.
-
@akshay-zz This code is not working as the 'this' in |
Beta Was this translation helpful? Give feedback.
-
@Pranomvignesh I never said it will work. |
Beta Was this translation helpful? Give feedback.
-
@akshay-zz I just added my point about |
Beta Was this translation helpful? Give feedback.
-
Has any one able to find a solution for this ? I am also stuck looking for a solution for scenario 3. |
Beta Was this translation helpful? Give feedback.
-
I came up with this hack...not the most efficient, but does the job. https://gist.github.com/cnayan/23cfde150a83f33a5e4da3b59284ea2b |
Beta Was this translation helpful? Give feedback.
-
The below simple method (could be a hack ) worked for me without much tweaking and merging. Copy paste to monaco playground to check it in action. I used the "range" property. I had to disable consistent-return of eslint as there is nothing in the else part of the "if" check ( I believe you can return empty array [] there and check ).
There could be some unseen issues, but this could be a good starter for someone looking for a solution. |
Beta Was this translation helpful? Give feedback.
-
Hello,is there a good solution for this issue? |
Beta Was this translation helpful? Give feedback.
-
3 years ago this was created and we are still waiting for the possibility to combine multiple providers. |
Beta Was this translation helpful? Give feedback.
-
Actually I'm looking into a way in which I can achieve all these following cases.
1 - I can provide only custom suggestions. If no suggestion is present. Then nothing(blank) should be shown as suggestion.
2 - I can provide only Monaco default suggestion(words existing in the editor).
3 - I can provide custom suggestion + Monaco default suggestion(words existing in the editor).
What's the current existing behavior?
1 - I can achieve first case by returning a suggestion or a blank suggestion.
2 - I can achieve second case by not returning any suggestion(not even the blank suggestion object).
Is there's a way to achieve third case?
Beta Was this translation helpful? Give feedback.
All reactions