[solved] No intellisense / autocomplete in VS Code on Linux, but works on Windows

In my Haxe projects, specifically when booting into Linux, I never get intellisense autocompletion in VS Code, no popup when hovering over keywords or anything. If I boot into Windows, and open the same project, intellisense works fine in VS Code.

But I don’t have this problem with other languages, eg. for C++ in VS Code in Linux, intellisense works fine.

I’m specifically working with Kha, but I still get no intellisense in a simple Haxe project like this one Dropbox - Haxe - Simplify your life

I even switched from Manjaro to EndeavourOS, clean re-install, and still no intellisense for haxe projects in VS Code.

Here’s my plugins in VS Code;

Output window:

Haxe language server started
Haxe Path: haxe
Using --server-connect
Haxe connected!
Listening on port 6000

Sometimes, I will see the popup about “Unable to build cache” as described in this post Vscode error on fresh install..... "Unable to Build Cache", and this is the output:

Haxe language server started
Haxe Path: /home/domarius/My Files/Game Development/Savage Steel/work/Game/Kha/Tools/haxe/haxe-linux64
Using --server-connect
Haxe connected!
Listening on port 6000
Failed - try fixing the error(s) and restarting the language server:

Type not found : Main

The Main class has not been changed, and the project will always compile and run successfully. But intellisense doesn’t work in any case.

Once in a blue moon, intellisense will start working, for a brief moment. Then I’ll do another build, and it’ll stop working again.

The project builds and runs just fine. I have installed haxe, nodejs, neko and vscode. Something worth noting is the Arch repository (which Manjaro and Endeavour OS use) the version of VS Code is “Code - OSS” and I have to edit product.json to change the value for “extensionsGallery” from the OSX one to the Microsoft one, to get the right plugins for everything (I can include more info from this if needed, just trying not to be too verbose). But I had another Manjaro user direct me into installing the “insiders” version of VS Code using snap, and I still had the same problem with intellisense.

No intellisense settings are disabled, everything is at the default.

Here are some of my system details;

Operating System: EndeavourOS
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.14.6-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700K CPU @ 4.00GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2

Completion probably works when Haxe Path is haxe and breaks when Kha trying to use /home/domarius/My Files/Game Development/Savage Steel/work/Game/Kha/Tools/haxe/haxe-linux64 binary. Try to disable Kha extensions (except Haxe | Haxe language support) and reopen this project to see if problem is related to Kha extensions.
To create and work on Kha projects you need to open command palette in VSCode and write Kha init in empty opened folder to see Kha project initialization command (with all extensions).

Done - disabling the Kha extension prompts it to ask you to disable the whole extension pack, which just amounts to the Kha extension pack and the Kha extension, see screenshot;

Restarted VS Code. Still no intellisense in the plain Haxe project.

Also the Kha creator (Rob) told me the Kha extension only activates when a projects contains a khafile, so it’s not surprising disabling it didn’t make a difference.

This is all I get
Peek 2021-09-21 10-14

Problem solved with the help of NotBilly on the Haxe Discord.

Either spaces in the project path, or a long project path, will cause the intellisense to fail.

The project was in
/home/domarius/My Files/Game Development/Test/Haxe test 2/

Moving the project to

fixed the problem.

Have logged a bug with the vshaxe extension.