shreyashsaitwal / rush-cli

:zap: A new and improved way of building MIT AI2 extensions.
GNU General Public License v3.0
46 stars 24 forks source link

Add support automation for VS Code #43

Closed jewelshkjony closed 7 months ago

jewelshkjony commented 1 year ago

Add support automation for VS Code.

Please add automation support for Java and Kotlin languages in VS Code.

(Thanks for your Rush)

shreyashsaitwal commented 1 year ago

What do you mean by automation support?

jewelshkjony commented 1 year ago

When we code in Android studio, Android studio suggest us for best code. This suggestion is not working on VS code for Rush project. Please add this features in 2.0

shreyashsaitwal commented 1 year ago

So you basically mean intelli-sense features (autocompletion, etc.). I did put some efforts to make VSCode intelli-sense work for Rush projects previously, but never really got it working.

I will give it shot again, but can't promise anything. If you, or anyone else is interested in contributing this, you might want to look into Eclipse configuration files. These are equivalent to the IntelliJ configuration files (found in .idea) folder and used by Eclipse JDT lang server (this is what VSCode uses under-the-hood for providing Java lang support).

shreyashsaitwal commented 1 year ago

Will be available in v2.0.0.

PS: 1c328f5779b051caa96f4e67040e86eab9e1dc70

ysfchn commented 1 year ago

Just found out that you can create a settings.json file in the .vscode folder in the project directory (.vscode/settings.json), and point to the jar files where Rush has installed:

{
    "java.project.referencedLibraries": [
        "deps/*.jar",
        "~/rush/dev-deps/**/*.jar",
        "~/rush/dev-deps/*.jar"
    ]
}

(Java Language Support extension by Red Hat must be installed.)

It apparently works:

resim

shreyashsaitwal commented 1 year ago
java.project.referencedLibraries

Wasn't aware this existed. Thanks a lot!

jewelshkjony commented 1 year ago

Yes it's really working. But it's not working for kotlin, do you've any solution for kotlin too?

ysfchn commented 1 year ago

But it's not working for kotlin, do you've any solution for kotlin too?

I don't know, unfortunately. I accidentally found the above setting while playing with Java extension settings.