Crates.io | ink-lsp-server |
lib.rs | ink-lsp-server |
version | 0.3.0 |
source | src |
created_at | 2023-06-30 18:03:20.454248 |
updated_at | 2024-05-03 16:13:13.199223 |
description | A Language Server Protocol (LSP) implementation for the ink! smart contract programming language. |
homepage | https://github.com/ink-analyzer/ink-analyzer |
repository | https://github.com/ink-analyzer/ink-analyzer |
max_upload_size | |
id | 904816 |
size | 241,294 |
A Language Server Protocol (LSP) implementation for the ink! smart contract programming language.
It implements the Language Server Protocol (LSP) and acts as a backend that provides language support features like diagnostic errors, code completion suggestions, code/intent actions and hover content to IDEs, code editors and other development tools.
It uses the semantic analyzer as the engine for providing ink! language support features by:
It additionally uses rust-analyzer's lsp-server crate to handle LSP protocol handshaking and parsing messages, and the lsp-types crate for LSP type definitions.
Run
cargo install ink-lsp-server
Run
git clone https://github.com/ink-analyzer/ink-analyzer.git
cd ink-analyzer
cargo build --bin ink-lsp-server --release
Copy the compiled binary (named ink-lsp-server
) from the target/release
directory to your preferred installation location, make sure the binary is executable and the installation location is included in the PATH
environment variable.
The installed ink! Language Server binary can be used with any LSP client that can be configured to launch an LSP server using an executable command (i.e. the path to the ink-lsp-server
binary) and can use stdio (standard in/standard out) as the message transport.
While a few editors/IDEs have native/built-in LSP clients (e.g. Neovim), most LSP clients are plugins/extensions for editors/IDEs.
ink-lsp-server
binary help text.
Language Server Protocol (LSP) implementation for the ink! smart contract programming language.
Usage: ink-lsp-server
Options:
-h, --help Print help
-V, --version Print version
https://docs.rs/ink-lsp-server/latest/ink_lsp_server/
Or you can access the library documentation locally by running the following command from the project root
cargo doc -p ink-lsp-server --open
You can run unit and integration tests for all the core functionality by running the following command from the project root
cargo test -p ink-lsp-server
Licensed under either MIT or Apache-2.0 license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.