ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Wrong or no functionality in sublime-text 3 #191

Open xb36 opened 1 year ago

xb36 commented 1 year ago

Please assist me with the setup. I installed tern_for_sublime (first using the package control for st3, now following the approach given here). The package gets recognized, that is, I can see the package in the preferences-package settings. My Settings look like this at the moment: Tern.sublime-settings:

{
    "tern_argument_hints": true,
    "tern_argument_completion": true
}

.tern-project (at project root):

{
  "libs": [
    "browser",
    "ecmascript"
  ],
  "plugins": {
     "node": {},
     "modules": {},
     "es_modules": {}
  },
  "projectDir": "./src/",
  "loadEagerly": ["./src/"]
}

However, at the moment I do not get any suggestions / tooltips / whatsoever. When I installed the package from package control, it displayed the wrong suggestions (e.g. http.listen for CustomClass.listen method), if any.

Here is the actual listen method that I am refering to, including jsdoc comment:

    /**
     * Listen on socket.io connection
     *
     * @param   {Object} oServer socket.io Server
     *
     * @returns {undefined}
     */
    static async listen (oServer) {
        if (this.IO) throw new Error ("Can only listen to one socket server")
        if (oServer.constructor.name !== "Server") throw new Error ("Argument 1 must be of type 'Server'")
        this.IO = oServer
        this.IO.on('connection', this._setup)
    }

(Note: When I install tern_for_sublime via the st3 package control, I get an error, that Tern has not be installed, and asks whether or not it shall install it. I click "Yes, install". The result when I click in the function call:)

image

As mentioned, installing via git clone / npm install does not give me any functionality at all.

What am I doing wrong // what information can I give you to investigate this further?

(using Ubuntu 20.04 and Sublime Text Build 4143 from the stable channel, installed via apt [deb https://download.sublimetext.com/ apt/stable/])

Best