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

feat(nargo): Add lsp command to start server that reports no capabilities #1560

Merged
merged 7 commits into from
Jun 7, 2023

Conversation

phated
Copy link
Contributor

@phated phated commented Jun 5, 2023

Description

Problem*

Resolves

Summary*

This PR puts in place the scaffolding for the LSP server logic via nargo_lsp crate and then constructs a Tower stack via the lsp command in nargo_cli. The LSP currently reports no capabilities, but serves as the skeleton to prove that noir-lang/vscode-noir#3 can communicate with it (enable tracing in the options).

The choice to use async-lsp was made because it sets out to solve a bunch of tower-lsp problems.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

This will add an additional command to the Nargo CLI and we will need to update the docs to mention the VSCode extension that provides the LSP client.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

crates/nargo_lsp/Cargo.toml Outdated Show resolved Hide resolved
crates/nargo_lsp/src/lib.rs Outdated Show resolved Hide resolved
crates/nargo_lsp/src/lib.rs Outdated Show resolved Hide resolved
crates/nargo_cli/src/cli/mod.rs Outdated Show resolved Hide resolved
crates/nargo_cli/Cargo.toml Outdated Show resolved Hide resolved
@kevaundray
Copy link
Contributor

One nit: To be consistent, can you add a header in https://github.com/noir-lang/noir/blob/master/crates/readme.md with the lsp since it a new crate

@phated
Copy link
Contributor Author

phated commented Jun 6, 2023

@kevaundray that's done, but the readme.md file is very out of date and still references acvm/acir and is missing other crates.

@phated phated requested a review from TomAFrench June 6, 2023 17:51
@TomAFrench TomAFrench added this pull request to the merge queue Jun 7, 2023
Merged via the queue into master with commit e28529d Jun 7, 2023
@TomAFrench TomAFrench deleted the phated/lsp-scaffold branch June 7, 2023 11:33
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.

3 participants