From 3c79bf51170caf09642da3cc23ba389ed57a79ac Mon Sep 17 00:00:00 2001 From: Slin Lee Date: Mon, 21 Mar 2022 19:22:34 -0700 Subject: [PATCH] Add LSP support for Solidity (#1848) * Add LSP support for Solidity This requires a recent version of Solidity 0.8.11+ * Add Solidity to docs * Update the docs --- book/src/generated/lang-support.md | 1 + languages.toml | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index a3fbe8a39387..83ea8dac9d0d 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -54,6 +54,7 @@ | ruby | ✓ | | ✓ | `solargraph` | | rust | ✓ | ✓ | ✓ | `rust-analyzer` | | scala | ✓ | | ✓ | `metals` | +| solidity | | | | `solc` | | svelte | ✓ | | ✓ | `svelteserver` | | tablegen | ✓ | ✓ | ✓ | | | toml | ✓ | | | | diff --git a/languages.toml b/languages.toml index 5aa1b2c8a6a6..f81b0c4e60e7 100644 --- a/languages.toml +++ b/languages.toml @@ -988,3 +988,14 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "org" source = { git = "https://github.com/milisims/tree-sitter-org", rev = "1c3eb533a9cf6800067357b59e03ac3f91fc3a54" } + +[[language]] +name = "solidity" +scope = "source.sol" +injection-regex = "sol" +file-types = ["sol"] +roots = [] +comment-token = "//" +indent = { tab-width = 4, unit = " " } +language-server = { command = "solc", args = ["--lsp"] } +