Apex 言語サーバは、ツールがコード編集機能 (コード補完など) へのアクセス、定義への移動、すべての使用法の確認、リファクタリングなどを行う手段で、IDE に関係なく使用できます。VS Code 向け Salesforce 拡張機能が、他の IDE にもアクセスできる Apex アナライザを実装する強力な方法です。
Apex 言語サーバは、言語サーバプロトコル 3.0 仕様の実装です。この言語サーバプロトコルにより、ツール (この場合は VS Code) が言語スマートネスプロバイダ (サーバ) と通信できるようになります。Salesforce ではこの共通仕様を使用して Apex 言語サーバを構築し、ツーリングパートナーが各自のツールのスマートネスを向上できるようにしています。
エラー
I have a possible workaround.
- Go to the settings of VS Code and search for "salesforcedx-vscode-apex".
- Look for the Java: Home entry and paste the path of your Java jdk folder.
- If you don't have Java installed, I recommend to download the newest 17 version. Use this path, for example C:\Program Files\Java\jdk-17. Version 18 is not yet supported.
[{
"resource": "/ApexLSP",
"owner": "apex",
"severity": 8,
"message": "Unable to activate the Apex Language Server - Running java command C:\Program Files\Java\jdk-17\bin\java -XshowSettings:properties -version failed with error: spawn C:\Program Files\Java\jdk-17\bin\java ENOENT",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}]
this issue was fixed. All I did was jnstalling everything from scratch but downloading the installers instead of just running them and now I am struggling with another situation
この問題は修正されました。私がやったのはすべてを最初からインストールすることだけでしたが、インストーラーを実行するだけではなくダウンロードし、今は別の状況で苦労しています
I think the error is because .git/ does not exist in the same directory as package.json.
このエラーは、.git/ が package.json と同じディレクトリに存在しないためだと思います。