Sublime Forum

I don't know what happened to the package of JavaScript Completions?!

#1

Hello professional engineers and Hello every one

I have ST version 4180 I was having the package of JavaScript Completions installed and working,

But yesterday I was writing JavaScript and I decided to install the package of Nodejs and after installation I did not change any settings I just returned to writing JavaScript and discovered that auto completion has just stopped working as it was before installing the package of [Nodejs],

And even the basic built in completion of Sublime Text stopped working automatically, I have to press Tab to get the suggestions of the built in completion of Sublime Text,

And once I reinstall or disable then enable the package [JavaScript Completions] the status bar of ST gives me the message of

Can’t install Node.js! Check your internet connection

like thisScreenshot%20from%202024-08-15%2011-07-46

I do not know what happened after installing the package [Nodejs]

Please can someone help me with that and I thank you very very much I appreciate that for you

0 Likes

#2

I suggest you to avoid using such “completion” packages and use LSP and LSP-* packages. LSP is what powers the intellisense in most of modern editors nowadays.

0 Likes

#3

I thank you very much I appreciate your advice I do not have much knowledge about completion packages what is LSP what package can I use?
do you mean by LSP-* the packages that its name starts with LSP- ?
thank you for giving from you knowledge

0 Likes

#4

Yes, everything that starts with LSP in PackageControl. First, install the “base” package called LSP then install the ones you need. For example, for Javascript, you need LSP-typescript.

Note that this will probably be a different experience than Javascript Completions (I have not tried it personally) but the idea is you are giving Sublime “intellisense” powers. For example, typing “Math.” will show you autocompletions (random, ceil, floor) for the Math module in JS

0 Likes

#5

what is the problem with completion package I was using?
Thank you I will return to Package Control and look for LSP
thank you very much

0 Likes

#6

Messages like “Check aour internet connection’” most likely are caused by an application being blocked from accessing network connections. Possible reasons are cable not connected, wlan off or out of reach or maybe just a firewall blocking an applications connection request.

JavaScript Completions downloads horribly out-dated NodeJS 7.7.0 to ST’s packages directory to run its logic on.

0 Likes

#7

I am running Linux Ubuntu 22 I am not sure if Ubuntu block ST from accessing the web,
But when I firstly installed the package before, it was installed, so if there were connection block it must appear in the first time
what do you mean by

I do not have much knowledge about that

thank you very much

0 Likes

#8

Instead of attempting to use a likely up-to-date nodejs 18-22 available on your system, the plugin downloads 10 years old NodeJS 7.7 to ~/.config/sublime-text/Packages/JavaScript Completions folder and uses that to run its js modules on. This may or may not have some security implications.

LSP plugins however either use available nodejs from system or install latest ones.

1 Like