Autocomplete provider not working for new package


#1

my package json file

  "providedServices": {
    "autocomplete.provider": {
      "versions": {
        "1.0.0": "completions"
      }
    }
  } 

my package js file
/this function is successfully called/

completions: function() {
    return completionsProvider;
  }

completionsProvider js file

(function() {
  module.exports = {
    selector: ".source.myext",
    inclusionPriority: 100,
    excludeLowerPriority: true,
    suggestionPriority: 2,    
    getSuggestions: function (editor, bufferPosition, scopeDescriptor, prefix) {
      console.log('completionsProvider.prototype.getSuggestions');
       return []
    }
  }
}).call(this)

getSuggestions function is not invoked when I type text (in file with extension “.myext”). Any suggestion please


#2

You should wrap your code in code tags (highlight it and click on the </> button above the editor) so that we can observe it as you’ve written it.


#3

Thanks for your suggestion. Incorporated code block highlight.


#4
  "providedServices": {
    "autocomplete.provider": {
      "versions": {
        "2.0.0": "completions"
      }
    }
  } 

changing the version to 2.0.0 solved the problem