Skip to content

Commit

Permalink
fix: show Rust codelens
Browse files Browse the repository at this point in the history
Signed-off-by: azerr <azerr@redhat.com>
  • Loading branch information
angelozerr committed Dec 14, 2024
1 parent 7694cba commit 1f1ed7a
Show file tree
Hide file tree
Showing 3 changed files with 450 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ private static GeneralClientCapabilities getGeneralClientCapabilities() {
// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#didChangeConfigurationClientCapabilities
workspaceClientCapabilities.setDidChangeConfiguration(new DidChangeConfigurationCapabilities(Boolean.TRUE));

// Refresh support for CodeLens
workspaceClientCapabilities.setCodeLens(new CodeLensWorkspaceCapabilities(Boolean.TRUE));

// Refresh support for InlayHint
workspaceClientCapabilities.setInlayHint(new InlayHintWorkspaceCapabilities(Boolean.TRUE));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,84 +1 @@
{
"imports": {
"granularity": {
"group": "module"
},
"prefix": "self"
},
"cargo": {
"buildScripts": {
"enable": true
}
},
"completion": {
"autoimport": {
"enable": true
},
"autoself": {
"enable": true
},
"callable": {
"snippets": "fill_arguments"
},
"fullFunctionSignatures": {
"enable": false
},
"limit": null,
"postfix": {
"enable": true
},
"privateEditable": {
"enable": false
},
"snippets": {
"custom": {
"Arc::new": {
"postfix": "arc",
"body": "Arc::new(${receiver})",
"requires": "std::sync::Arc",
"description": "Put the expression into an `Arc`",
"scope": "expr"
},
"Rc::new": {
"postfix": "rc",
"body": "Rc::new(${receiver})",
"requires": "std::rc::Rc",
"description": "Put the expression into an `Rc`",
"scope": "expr"
},
"Box::pin": {
"postfix": "pinbox",
"body": "Box::pin(${receiver})",
"requires": "std::boxed::Box",
"description": "Put the expression into a pinned `Box`",
"scope": "expr"
},
"Ok": {
"postfix": "ok",
"body": "Ok(${receiver})",
"description": "Wrap the expression in a `Result::Ok`",
"scope": "expr"
},
"Err": {
"postfix": "err",
"body": "Err(${receiver})",
"description": "Wrap the expression in a `Result::Err`",
"scope": "expr"
},
"Some": {
"postfix": "some",
"body": "Some(${receiver})",
"description": "Wrap the expression in an `Option::Some`",
"scope": "expr"
}
}
}
},
"termSearch": {
"enable": false,
"fuel": 200
},
"procMacro": {
"enable": true
}
}
{}
Loading

0 comments on commit 1f1ed7a

Please sign in to comment.