Can't Find certain extensions in CODE-OSS(Open source variant of Visual Studio Code) - visual-studio-code

I have been using Code-OSS in manjaro linux for some months now and this is the first time I am encountering this. (After I reinstalled manjaro) When I search for e.g, Java Extension Pack or Intellisense I don't get any result in the extension marketplace. I don't know if it's the problem of my setup or everyone is experiencing this. If you know of a solution please tell me.
Thanks in advance

This can be fixed by adding following to product.json:
"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items"
}
This can also be fixed by copying product.json from an official build (in the .zip archvie, product.json is under /usr/share/code/resources/app/product.json which contains above lines). Depending on your distribution, exact location may vary.
More information: https://github.com/Microsoft/vscode/issues/1557

As an alternative to manually editing product.json or building whole visual-studio-code-bin from AUR you can use different AUR package - code-marketplace - that patches product.json from Code OSS package (code)

Thank you #Clay for responding. I saw that post prior to me posting this question. Those bits of json code were already in my product.json file but still I was not able to get the extensions. Then I built the VISUAL STUDIO CODE (visual-studio-code-bin) from AUR and now its working normally as expected. I don't know what's the reason behind this,but that's how I fixed it.
Also if someone is reading this and wanna know about the different variants of VSCode then here is the archWiki page for VSCode.

For anyone using the lscr.io/linuxserver/code-server docker container like me, the .json is located at /app/code-server/lib/vscode/product.json.

I've encountered this using OSS Code on Manjaro as well, trying to install the Azure Resource Manager Tools extension. Not sure if this was an option when this question was posted, but you can download the extension (.vsix) file if possible, then bring up 'quick open' in OSS Code using Ctrl+Shift+P, search for "VSIX" and choose "Extensions: install from VSIX" to locate and install the downloaded .vsix file.
After this, the extension was installed and usable in OSS Code, and is also configurable in the extension manager panel.

Related

VSCode 'The file is in the program because: Default library for target 'es3''

I'm using VSCode. After the last update of the IDE, I see this error (Even if I didn't open any project to work on).
I googled it, and I tried several actions according to this link:
https://github.com/microsoft/TypeScript/issues/43838
but none of them seems to work.
Anyone faced the issue? (I'm not using TypeScript in any of my projects and I don't have any tsconfig.ts file). Is it related to one of my VSCode extensions?
It is a general update problem about visual-studio-code with the last update. Issue can be followed from here: https://github.com/microsoft/vscode/issues/168420
Installing JavaScript and TypeScript Nightly extension is helpful for me.
Configure .eslintrc.json in your folder again and reload the vs code
example:
.eslintrc.json file for salesforce
Or
you can refer below link to config your eslint file
https://eslint.org/docs/latest/user-guide/configuring/

Why would a custom VSCode Extension work in development but not when published?

I am stumped. I worked several months developing a language extension for VSCode and it works great in the extension development environment. But when I publish it, it does not function. I have tried everything to no avail.
Any suggestions as to why it wouldn't work specifically when published would be greatly appreciated.
Extension:
https://marketplace.visualstudio.com/items?itemName=dehilster.nlp
Source code:
https://github.com/VisualText/vscode-nlp
It turns out that there was a dependency missing (in this case tslib) and I had to add it to the package building directly. For some reason, the tslib being listed as a dependency in the package.json file didn't seem to fix it. So I added the folder node_modules/tslib/**/* to the .vscodeignore file and then it worked. THis is not the way ultimately do this but it works for now.

Duplicate hints while typing expression in Visual Studio Code

Why do I have the same suggestions while typing expression?
Example:
I had exactly the same problem. After a week or so, it get really annoying.
basically, as the comments hint to, there are probably multiple linting or intelisense tools. In my case (for python) i had the pylance extension added.
When i disabled this, the problem went away, but features were missing. So i added it back...
For some reason (i dont know why), this fixed the problem !!!
I can only hypothesise that in some way the extension was corrupted. Nevertheless, it worked.
EDIT:
I can also confirm that unchecking this setting appears to work:
Jupyter: Pylance Handles Notebooks
My current system is Windows 11, with python 3.10.
Final edit (8 Dec 2022):
This is resolved here:
Please could you install VS Code 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists.
Visual Studio Code provides an API so third-party extensions and built-in modules can contribute suggestions for auto-completion pop-ups. The system is currently designed so suggestions are merely appended—there's no duplicate detection or removal (perhaps because extensions can also take care of sorting suggestions and such algorithm would get on the way). That means that if you have more than one extension or module for a given language you can easily get duplicate entries.
Having several extensions for PHP is not necessarily a bad idea since they can address different needs (for instance, PHP DocBlocker just creates annotations, it doesn't provide auto-completion suggestions) but you have at least two extensions (PHP Intelephense and PHP Intellisense) that do exactly the same things. That's likely to hurt performance (all your workspace files will be scanned several times) and just adds noise.
I suggest you read the extension descriptions carefully to learn what they do exactly and then figure out which ones you need. Remember that extensions can be enabled/disabled in a per-workspace basis.
The following is just my own totally subjective opinion. Among the PHP extensions that provide code intelligence only two of them seem mature enough:
PHP Intelephense
PHP Intellisense
I've tried both. PHP Intelephense works best for me than PHP Intellisense so that's the one I've kept. I've also disabled php.suggest.basic following the installation instructions because basic suggestions didn't add any value to me (they were blind string matching):
Turn off the php.suggest.basic setting for best results.
... as well as taming builtin Emmet support, which was providing really dumb suggestions:
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"
YMMV.
TLDR; Installing pre-release version of Jupyter solves (v2022.11...)
Ok, so after some more extensive experimentation I think I found what's causing this in my case. After looking at the processes I noticed that there were two Pylance processes running, and consistently this would only be a problem if I was working in a session with a jupyter notebook open or one that had been opened.
saun89 17740 37.3 0.3 1008004 199492 ? Sl 20:58 0:22 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:9178e897a2b78b36bfd167f79b36c3bdad2931d71b --node-ipc --clientProcessId=17651
saun89 18743 257 0.7 1304584 382288 ? Sl 20:59 0:20 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:8744a321767eed92821fd737be4dc7dcfb728284e5 --node-ipc --clientProcessId=17651
Pylance basically spins up a service for the workspace, and then spins up a separate service for the notebook.
Output from "Python Language Server" logs:
Disabling Jupyter removes the duplication, and after installing an earlier version of the extension (v2022.4) this appears to have fully resolved the issue. I'm going to go ahead and log the extension bug once I have something reproducible.
As of 11/30/22, Jupyter Extension Pre-Release version v2022.11.1003281132 is the latest version fixes this issue. Click the gear icon next to the extension and you should see "install another version..." Then you can select version v2022.11.1003281132.

VS Code - Unable to find and install C++ extension

I have been trying to install C++ extension in Visual Studio Code (latest version). But I am keep getting "No extension found".
I have tried to search a possible cause for this error but so far, I have not found any useful results.
What is the issue and how to resolve it ?
As mentioned in the comments,
Sometimes, marketplace get offline and thus cause these issues.
However, there is a easy hack for this,
Create a *.c file and VS Code will show you that there is a recommended Extension "C/C++"

autocomplete in a file without project in netbeans

Is it possible to activate full autocompletion without having the file added to a project?
Maybe with a plugin or any another modification?
I installed the plugin "remote file systems" for netbeans 6.9.1 (php)
(http://www.stoehrer.net/downloads/remotefs/nb-remotefs-0.1.3.zip) to access my linux server over ssh on my windows machine.
Autocompletion doesn't work with it - the files have to be in a netbeans project :(
I also tried the mounting tool "dokan" but sometimes it destroys a file when I save.
Other mounting tools work less well or just show my home folder.
Sorry for my english and thx for your answer.
coudnt solve the problem that way
so i used samba and add the files to a netbeans project
wasnt easy because for some reason
i have to use the ip path ("\\192.168.xx.xxx" and type my smbuser and the password)
to map the drive in windows
on my other pc i didnt need that. dont know why
bye guys
There is an open bug, or as they have called it, the umbrella issue #135222, to aggregate requests and ideas regarding how to
Improve support for editing files that do not belong to a project.
I have just added the suggestion of somehow allowing to define a classpath for files that don't belong to any project. I hope I can soon update this answer with a "there is a better way..." ;-)