callSignatureHelp method
Calls the LSP signature help feature.
This method requests signature help from the Language Server Protocol (LSP) for the current cursor position, displaying available parameters and highlighting the parameter in focus within function parentheses.
Implementation
Future<void> callSignatureHelp() async {
if (lspConfig != null) {
final cursorPosition = selection.extentOffset;
final line = getLineAtOffset(cursorPosition);
final lineStartOffset = getLineStartOffset(line);
final character = cursorPosition - lineStartOffset;
signatureNotifier.value = await lspConfig!.getSignatureHelp(
openedFile!,
line,
character,
1,
);
}
}