Conversation
built-in `Span` of the `simplicityhl::parse::Call` calculated as full call, with parameters and generics, so we use custom calculation of call using length of the representing string
Collaborator
|
Add gifs and list of features supported by the LSP to README pls |
Collaborator
|
Fix: Cmd + hover on the function shows funcs sig twice |
KyrylR
requested changes
Oct 22, 2025
| let document = documents.get(uri)?; | ||
|
|
||
| let token_position = params.text_document_position_params.position; | ||
| let token_span = positions_to_span((token_position, token_position)).ok()?; |
Collaborator
There was a problem hiding this comment.
Suggested change
| let token_span = positions_to_span((token_position, token_position)).ok()?; | |
| let token_span = positions_to_span((token_position, token_position))?; |
Add support for:
Conversion of tower_lsp_server::lsp_types::Position to simplicityhl::error::Span
| .iter() | ||
| .find(|function| function.name() == func)?; | ||
|
|
||
| let (start, end) = span_to_positions(function.as_ref()).ok()?; |
| .last() | ||
| } | ||
|
|
||
| fn get_call_span(call: &simplicityhl::parse::Call) -> Option<simplicityhl::error::Span> { |
Collaborator
There was a problem hiding this comment.
Use Result instead of Option pls
Collaborator
|
Is it possible to use HashMap instead of |
change to match behaviour of `hover` command, which is reduces boilerplate with `Result`, because we don't throw errors on this functions
- moved unrelated function to utils.rs - add several small unittests
it combines function and docs into one HashMap with clear interface for getting functions or docs for them
Member
Author
methods in `utils.rs` was returning different kind of error: `TryFromIntError` and `jsonrpc::Error` which was difficult work with. `LspError` support converting from `TryFromIntError` and to `jsonrpc::Error`
Collaborator
|
Use thiserror pls |
KyrylR
requested changes
Oct 28, 2025
| - Basic diagnostic for SimplicityHL code | ||
| - Completions of functions and jets | ||
|
|
||
|  |
Collaborator
There was a problem hiding this comment.
Do not use user attachments
Collaborator
There was a problem hiding this comment.
Add gifs directly into the repo
|
|
||
| /// Get generic functions completions. | ||
| pub fn get_function_completions(functions: &[(Function, String)]) -> Vec<CompletionItem> { | ||
| pub fn get_function_completions(functions: &Vec<(&Function, &String)>) -> Vec<CompletionItem> { |
| } | ||
| }) | ||
| .filter(|(_, span)| span_contains(span, &token_span)) | ||
| .map(|(call, _)| call.clone()) |
Collaborator
There was a problem hiding this comment.
Is it possible to avoid cloning?
change user attachments and moved them inside repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.