Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added solidity language server setup guide #2383

Merged
merged 5 commits into from
Apr 15, 2024

Conversation

hexnickk
Copy link
Contributor

Description

Just added a quick guide how to make LSP package to work with solidity, I've also tried to make solc lsp to work, but hardhat-vscode feels much more suitable and easier to set up.

Demo

image image

docs/src/language_servers.md Outdated Show resolved Hide resolved
Comment on lines 632 to 634
1. Install [github:NomicFoundation/hardhat-vscode](https://github.com/NomicFoundation/hardhat-vscode/tree/development/server) (follow instructions in the repo):

2. Open `Preferences > Package Settings > LSP > Settings` and add the `"solidity"` client configuration to the `"clients"`:
Copy link
Member

@rchl rchl Dec 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the user also has to install some syntax for "solidity"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "some syntax"? Installing specific solidity version is not required, nomic language server is capable of working with multiple solidity versions out of the box, as far as I can tell, but I will also double-check that just in case

There are also multiple toolkits as hardhat/foundry/... but it also looks like nomic language server is capable of figuring it out on itself

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source.solidity scope used for "selector" is not built-in from Sublime Text, so you would need to have the according syntax package from Package Control installed to make the language server start. The other config examples on this page link to the syntax packages.

@@ -627,6 +627,23 @@ Follow installation instructions on [LSP-metals](https://github.com/scalameta/me
}
```

### Solidity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is under the "Shell" programming language section. Use 2 hashes if it's a separate programming language.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my bad, will fix 👍

Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for sublime-lsp ready!

Name Link
🔨 Latest commit 45f3b69
🔍 Latest deploy log https://app.netlify.com/sites/sublime-lsp/deploys/661ce96a0f7e3f000807dcfc
😎 Deploy Preview https://deploy-preview-2383--sublime-lsp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@predragnikolic predragnikolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
and sorry for the wait.

@predragnikolic predragnikolic merged commit 779ddd7 into sublimelsp:main Apr 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants