Skip to content

Add environment objects and methods #242

Answered by lucabiasotto
byeze asked this question in Q&A
Discussion options

You must be logged in to vote

Hi guys, have you found a solution to suggest properties based on the object?

I followed @suren-atoyan example but I don't understand how to make different suggestions based on the object.

For example, if I write console the monaco suggests log, info etc...i want that that if the user writes mysql monaco suggests my custom methods.

This below is my code, but it has the following 2 problems:

  1. suggests query even though I haven't written mysql

  2. when I select mysql from the suggestions then monaco doesn't suggest query (unless I press cmd + space)

monaco.languages.registerCompletionItemProvider("javascript", {
      provideCompletionItems: (model, position) => {
        var word = model.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@suren-atoyan
Comment options

@lucabiasotto
Comment options

Answer selected by suren-atoyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants