From 779ddd7d69c9c6b5cee04f5d53760197fe0d9745 Mon Sep 17 00:00:00 2001 From: Nikita Kozlov Date: Mon, 15 Apr 2024 10:47:26 +0200 Subject: [PATCH] Added solidity language server setup guide (#2383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: added solidity language server setup guide * Update docs/src/language_servers.md Co-authored-by: Rafał Chłodnicki * use '## Solidity' instead of '### Solidity' * Add install Syntax instructions, and be consistent with other instructions * be more explicit --------- Co-authored-by: Предраг Николић Co-authored-by: Rafał Chłodnicki --- docs/src/language_servers.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/src/language_servers.md b/docs/src/language_servers.md index 230be130e..b85b1d59e 100644 --- a/docs/src/language_servers.md +++ b/docs/src/language_servers.md @@ -673,6 +673,24 @@ Follow installation instructions on [LSP-metals](https://github.com/scalameta/me } ``` +## Solidity + +1. Install the [Ethereum](https://packagecontrol.io/packages/Ethereum) package from Package Control for syntax highlighting. +2. Install the [github:NomicFoundation/hardhat-vscode](https://github.com/NomicFoundation/hardhat-vscode/tree/development/server) language server. +3. Open `Preferences > Package Settings > LSP > Settings` and add the `"solidity"` client configuration to the `"clients"`: + + ```jsonc + { + "clients": { + "solidity": { + "enabled": true, + "command": ["nomicfoundation-solidity-language-server", "--stdio"], + "selector": "source.solidity" + } + } + } + ``` + ## Stylelint Follow installation instructions on [LSP-stylelint](https://github.com/sublimelsp/LSP-stylelint).