-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature Request: Custom sorting and filtering of suggestion menu #1077
Comments
I also want to filter auto complete items based on the member's JSDoc (filter out members with @alexandrudima Any hint how to achieve this right now? EDIT: I'm talking about members from the TypeScript language provider. |
... I did this now by monkey-patching import { SuggestAdapter } from
"monaco-editor/esm/vs/language/typescript/languageFeatures";
const originalProvideCompletionItems = SuggestAdapter.prototype.provideCompletionItems;
SuggestAdapter.prototype.provideCompletionItems =
async function provideCompletionItems(...args) {
const result = await originalProvideCompletionItems.apply(this, args);
// ... change result.suggestions ...
return result;
}; |
no change planned |
@jrieken, specific to this issue, would you be open to a community PR which added a "custom user-provided function which takes the current list [of autocompletion suggestions] and returns a new list to use (could be a subset)."? In general, while I appreciate that you are taking the time to clean out old feature requests, might I suggest that you provide some reasoning why feature requests are rejected rather than simply stating "no change planned"? This particular feature would be greatly beneficial to the JavaScript editor I'm building for Google. 5 other Github members have thumbs-up'd this issue as well. I realize that's not a large number but feature request discovery is poor in Github. I understand that Microsoft is primarily interested in Monaco for use in Visual Studio Code but I imagine your team understands the impact this standalone editor has made to many other projects with varying needs. For all these other projects, it would be really helpful if there was a better venue for us to collaboratively rate the importance of feature requests. If there was sufficient voice behind specific feature requests, I imagine these would more likely come to fruition either by Microsoft devs or the community. Respectfully, |
monaco-editor version: v0.14.3
Currently, when hitting Ctrl-Space in a blank part of a document, you get lots and lots of autocomplete suggestions. These are sorted alphabetically (unless
sortText
is used). It would be helpful to allow customizable ordering of all completion items.Suggestions:
recentlyUsed
except it's more than 1 item)The text was updated successfully, but these errors were encountered: