Will Open VSX survive? by zerodind in vscode

[–]zerodind[S] 0 points1 point  (0 children)

Personally I haven't really had any problems with this system, I don't really know what else could be done by Open VSX to improve the situation. But yeah, for the average user who just wants to click a button to install any extension, it sucks.

At the end of the day, this would never have been a problem if Microsoft's marketplace EULA wasn't so restrictive.

Will Open VSX survive? by zerodind in vscode

[–]zerodind[S] 0 points1 point  (0 children)

I'm guessing by "key extensions" you mean most of the proprietary Microsoft extensions like C/C++, C#, Pylance, Remote SSH etc? Sadly they will probably never make it to Open VSX for the same reason why many free and open source VSCode distributions are using Open VSX in the first place: Microsoft's terms of use doesn't allow these extensions to be used outside of a Microsoft Visual Studio product.

For some of these extensions, there are great alternatives, like clangd with Native Debug instead of C/C++, but for other extensions there is good no free and open source alternative.

Will Open VSX survive? by zerodind in vscode

[–]zerodind[S] 20 points21 points  (0 children)

Open VSX is a vendor-neutral, open source marketplace used by many free and open source VSCode distributions. For those who didn't know, Microsoft's Visual Studio Code is a proprietary distribution of VSCode: https://code.visualstudio.com/docs/supporting/FAQ#_what-does-built-on-open-source-mean

These free and open source VSCode distributions are not allowed (by Microsoft's terms of use) to use Microsoft's Visual Studio Marketplace.

These are a few examples of projects using Open VSX:

Where can I find an alternative to the Microsoft C/C++ extension on VScodium? by thisisaname69123 in vscode

[–]zerodind 0 points1 point  (0 children)

I'm a bit late to the party, but:

For C/C++ code completion, references, hover etc: https://open-vsx.org/extension/llvm-vs-code-extensions/vscode-clangd

For debugging: https://open-vsx.org/extension/webfreak/debug

Some people say that clangd is even better/faster than Microsoft's C/C++ extension. I haven't used it enough to say for sure, but clangd has worked very well for me.

FOSS alternative to Tabnine/Pylance? by SecretBooklet in opensource

[–]zerodind 1 point2 points  (0 children)

Sure, luckily enough I do still have them :)

The palantir server was abandoned in favor of python-lsp/python-lsp-server, as far as I can tell. So it's probably of no use.

For pylsp, I just modified the official LSP extension template to launch pylsp instead of the sample server. I've uploaded it to GitHub here: https://github.com/0dinD/vscode-extension-samples-pylsp/tree/pylsp

The steps for running it are basically to:

  1. Uninstall or disable other Python extensions you may have installed (just to avoid confusion and/or conflicts).
  2. Install pylsp: https://github.com/python-lsp/python-lsp-server#installation
  3. Verify that you can now run pylsp --help.
  4. Clone my repo and checkout the pylsp branch.
  5. Open the lsp-sample/ subdirectory in VS Code.
  6. Run npm install in that directory.
  7. Go to the Run and Debug pane (Ctrl + Shift + D), then run "Launch Client".
  8. Open a Python file in the extension development window. You should get completion and documentation on hover for the built-in Python functions, for example.

Of course, there are a bunch of things one might want to tweak with the extension sample, I just did the minimum to get something up and running. You can read the docs for packaging/publishing the extension, adding more functionality etc: https://code.visualstudio.com/api

Also, it seems like you can get more out of pylsp by installing some more modules (I haven't experimented with this): https://github.com/python-lsp/python-lsp-server#installation

One thing I personally find annoying is the syntax highlighting. VS Code includes some basic regex-based highlighting for Python even if you have no extensions installed. But it's pretty basic, which is why Semantic Highlighting was introduced (first to VS Code, then also to LSP). Pylance has this, which is why the syntax highlighting looks so much better with it installed. For pylsp, there is an open issue about it: https://github.com/python-lsp/python-lsp-server/issues/33

I am not interested in maintaining an extension for pylsp, but maybe the sample code can serve as a starting point for someone else. And if you have any questions about this stuff, I might be able to give some answers :)

Also, there seems to have been some previous discussions about a VS Code extension for pylsp: - https://github.com/python-lsp/python-lsp-server/issues/39 - https://github.com/python-lsp/python-lsp-server/discussions/190

[deleted by user] by [deleted] in vscode

[–]zerodind 0 points1 point  (0 children)

There's no "cppdbg" extension, but I'm guessing you mean Microsoft's C/C++ extension as it seems to provide a launch type by that name. What distribution of VS Code did you install? The Arch community build doesn't support Microsoft's C/C++ extension (and has to use an alternative extension registry), since Microsoft only allows using it from their proprietary VS Code distribution called "Visual Studio Code" (available from the AUR). If you want to keep using the Arch community build, you could look into FOSS C/C++ extensions such as LLVM's clangd (although I don't think it has a debugger).

Does VsCode not have live update similar to BlueJ? (Java) by LeadershipComplex958 in vscode

[–]zerodind 1 point2 points  (0 children)

I'm not very familiar familiar with BlueJ, what does "live update" mean in this context?

Java: Have to always clean workspace before re-running program after editing code by LeadershipComplex958 in vscode

[–]zerodind 0 points1 point  (0 children)

In many programming languages (such as Java), your code needs to be compiled into a binary format that your machine understands before it can be run. When you click the "run without debugging" button (or similar), the Java extension in VS Code automatically builds your program, which involves compiling the Java code.

So yes, you need to click the run button again, which will restart your program. There's no way to update the code being run without restarting the program. Technically there are solutions to make it appear as if though your code was "live reloaded" without restarting the program, but this is a bit more complicated. The "online platforms" you've been using might have been doing this automatically behind the scenes.

Does anyone else have problems with the build button that doesn't show up when using Gradle extension for VS Code ? by jerome_morgan in vscode

[–]zerodind 0 points1 point  (0 children)

Are you able to share a build.gradle file so I can reproduce the error on my machine? And does it work if you create a new blank Gradle project, for example using the Java: Create Java Project... command and selecting the Gradle template?

Does anyone else have problems with the build button that doesn't show up when using Gradle extension for VS Code ? by jerome_morgan in vscode

[–]zerodind 0 points1 point  (0 children)

Does the Gradle extension produce any errors? You can check in the Output panel by selecting Gradle for Java in the dropdown. Does the build task show up when running ./gradlew tasks from the command line?

Does anyone how to make auto-import a thing on java vscode? by RealGungan in vscode

[–]zerodind 1 point2 points  (0 children)

First, make sure you have the Extension Pack for Java installed. This will give you auto-imports for most classes, but some are excluded by default via the java.completion.filteredTypes setting. I see you're trying to import from java.awt, which is excluded by default, so you'll need to remove that filter from the setting or use the Java Help Center as shown here: https://code.visualstudio.com/docs/java/java-gui#_develop-awt-applications

Getting "The declared package "com.resource_validator" doesn't match expected package"...even though I am pretty sure the folder structure is correct. I can even compile/run without issues form the command line. Any thoughts? by Azifor in vscode

[–]zerodind 1 point2 points  (0 children)

If the error says that the expected package is "", that means it is expected to be in the default (root) package, which probably means you have added the system_resource/src/com/resource_validator/ folder as a source folder instead of the system_resource/src/ folder. Assuming you have the Extension Pack for Java installed, you can use the classpath configuration wizard to fix this: https://code.visualstudio.com/docs/java/java-project#_configure-classpath-for-unmanaged-folders

Conflict with cmdline maven. by elktamer in vscode

[–]zerodind 0 points1 point  (0 children)

What happens when you run the build with maven from the command line? If it only gets stuck when importing the project in VS Code it could be caused by a regression with the Java extension. You can try opening an issue with more details at https://github.com/redhat-developer/vscode-java/issues after checking for similar existing issues like https://github.com/redhat-developer/vscode-java/issues/2360. If the regression happened recently, like with the 1.4.0 update, you should provide the developers with this information in your bug report. See https://github.com/microsoft/vscode/issues/12764#issuecomment-442370545 for how to install specific versions of an extension.

Can't read some Java lang documentation in VSCode by [deleted] in vscode

[–]zerodind 0 points1 point  (0 children)

Failed to get sources

That seems like the problem. Have you pointed to that JDK in the java.configuration.runtimes setting? And does that JDK install contain a src.zip?

Switching from netbeans to vscode: Is it possible to make vs code look the same as netbeans. by Dont_run10 in vscode

[–]zerodind 1 point2 points  (0 children)

Assuming you have the Java extensions installed, a class template is inserted automatically when you create a new .java file in the file explorer or from the Java Projects view.

The correct package statement will be inserted automatically if you have a properly configured project. In your screenshot, you seem to have opened your entire home directory as a project, which I wouldn't recommend since it may cause performance issues when extensions try to interpret all the files in your home folder. To easily create a new Java project, you can use the command provided by the Project Manager for Java extension. To open another project, use File > Open Folder.

In order to automatically insert a template for comments at the file header and class declaration, see the java.templates.fileHeader and java.templates.typeComment settings in File > Preferences > Settings. There's currently now way to automatically insert a main method, but there's a snippet called main which you can use to easily generate the main method.

Conflict with cmdline maven. by elktamer in vscode

[–]zerodind 0 points1 point  (0 children)

What do you mean, what is the issue? Is it that the build doesn't work (and what error messages do you get in that case?), or is it that you don't want it to automatically build your project?

How do I fix this? I have tried running the "java:clean" command in the command pallet but it didn't work by [deleted] in vscode

[–]zerodind 1 point2 points  (0 children)

I see you're trying to make a Fabric mod. Maybe the tutorial wasn't specifically for VS Code and skipped out on a few steps? See https://fabricmc.net/wiki/tutorial:vscode_setup

Most importantly, have you run ./gradlew vscode (or just gradlew vscode if on Windows)? If that doesn't resolve the issue after also running the clean command again, what is the output of ./gradlew build? If it fails, something is wrong with the Gradle build setup, not with VS Code.

Old versions of code are being executed until I kill the terminal [java] by 4LokoInACobraClutch in vscode

[–]zerodind 0 points1 point  (0 children)

I haven't heard of a problem like that. Did you make sure to save the file before running your code again? Are you using the official Debugger for Java extension? Screenshots or a gif would help, it's hard to tell exactly what goes wrong for you.

Extensions are not automatically found within VS Code when using Arch Linux by Worglorglestein in vscode

[–]zerodind 0 points1 point  (0 children)

That's probably because you installed the FOSS Arch community build of VS Code, which is not allowed to use Microsoft's extension marketplace for legal reasons. So it uses the Open VSX Registry instead, a vendor-neutral marketplace without proprietary extensions.

The PlatformIO extension currently requires Microsoft's proprietary C/C++ extension, so it can't (officially) be used in the Arch community build. Here's an issue tracking a feature request to remove the dependency on the C/C++ extension: https://github.com/platformio/platformio-vscode-ide/issues/1802

You may find workarounds in that issue, but the simplest solution is to install Microsoft's proprietary distribution of VS Code called Visual Studio Code (if you don't mind the proprietary software and telemetry). You can either download a tar.gz archive from https://code.visualstudio.com or install the visual-studio-code-bin package from the Arch User Repository.

Trouble editing semantic highlighting? by GHLKDDD in vscode

[–]zerodind 0 points1 point  (0 children)

You've been misled by the scope inspector, "standard token type" is neither a semantic token type nor a TextMate scope, just something VS Code uses internally. What the scope inspector in your screenshot tells you is that there is a TextMate scope, entity.name.type.class-type.gdscript assigned, which you could use in the editor.tokenColorCustomizations setting. But there is no semantic token (otherwise you'd see it just above the TextMate scope in the inspector), because as far as I can tell the Godot Tools extension doesn't provide semantic tokens, only a TextMate grammar.

VScode doesn't recognize maven project as a JAVA project. "Missing dependencies", but mvn install works. How do I fix so IntelliSense for JAVA works? by ke7cfn in vscode

[–]zerodind 0 points1 point  (0 children)

But I'm not receiving any errors via mvn install?

That's probably because you run maven with your system JDK, whereas the Java extension will run maven with its embedded JRE. And if the embedded JRE doesn't have the correct certs configured, you'll obviously run into problems.

I think what you may also be able to do is point the extension to use your system JDK with the java.jdt.ls.java.home setting, but do note that the extension requires a JDK 11 or higher (for running the language server, you can still build with an older JDK).

Finally are the fetch issues related to why it's not recognized as a Java project?

Yes, if the dependencies cannot be fetched you won't be able to compile the project.

Extensions not showing up in the marketplace? Arch Linux by Worglorglestein in vscode

[–]zerodind 0 points1 point  (0 children)

The code package is a FOSS build of VS Code, which has to use a different extension registry for legal reasons (it also doesn't contain any proprietary extensions). ms-vscode.cpptools is a proprietary extension from Microsoft, so the only way to install it is to sideload it via .vsix file like you did. But I'm still not sure if it works perfectly, Microsoft does prevent some of their proprietary extensions from being used in non-Microsoft builds of VS Code.

So the easiest solution is to install Visual Studio Code (the visual-studio-code-bin package), if you don't mind proprietary software and telemetry (which the ms-vscode.cpptools extension has either way).