mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
Need to allow this lint, the Hook signature requires Option<>.
This commit is contained in:
parent
3cf9a4ceb8
commit
0e5308bce1
@ -1327,10 +1327,24 @@ fn signature_help(cx: &mut Context, ch: char) {
|
||||
}
|
||||
}
|
||||
|
||||
// 2021-05-03T17:54:36.326 hx::commands [INFO] SignatureHelp { signatures: [SignatureInformation { label: "fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error>", documentation: None, parameters: Some([ParameterInformation { label: Simple("path: PathBuf"), documentation: None }, ParameterInformation { label: Simple("action: Action"), documentation: None }]), active_parameter: Some(0) }], active_signature: None, active_parameter: Some(0) }
|
||||
// SignatureHelp {
|
||||
// signatures: [
|
||||
// SignatureInformation {
|
||||
// label: "fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error>",
|
||||
// documentation: None,
|
||||
// parameters: Some(
|
||||
// [ParameterInformation { label: Simple("path: PathBuf"), documentation: None },
|
||||
// ParameterInformation { label: Simple("action: Action"), documentation: None }]
|
||||
// ),
|
||||
// active_parameter: Some(0)
|
||||
// }
|
||||
// ],
|
||||
// active_signature: None, active_parameter: Some(0)
|
||||
// }
|
||||
}
|
||||
|
||||
// The default insert hook: simply insert the character
|
||||
#[allow(clippy::unnecessary_wraps)] // need to use Option<> because of the Hook signature
|
||||
fn insert(doc: &Rope, selection: &Selection, ch: char) -> Option<Transaction> {
|
||||
let t = Tendril::from_char(ch);
|
||||
let transaction = Transaction::insert(doc, selection, t);
|
||||
|
Loading…
Reference in New Issue
Block a user