diff --git a/frontend/src/core/codemirror/completion/Autocompleter.ts b/frontend/src/core/codemirror/completion/Autocompleter.ts index 7591f6f49b0..6cb8d8e8336 100644 --- a/frontend/src/core/codemirror/completion/Autocompleter.ts +++ b/frontend/src/core/codemirror/completion/Autocompleter.ts @@ -60,7 +60,7 @@ export const Autocompleter = { info: () => constructCompletionInfoNode(option.completion_info), }; }), - validFor: /^\w*$/, + validFor: /^\w+$/, }; }, diff --git a/frontend/src/core/codemirror/completion/completer.ts b/frontend/src/core/codemirror/completion/completer.ts index a61701d9e70..79d6731d264 100644 --- a/frontend/src/core/codemirror/completion/completer.ts +++ b/frontend/src/core/codemirror/completion/completer.ts @@ -36,7 +36,7 @@ export async function completer( return null; } - // If it is a tooltip, show it as a Tooltip instead of a completion + // If it is a tooltip, set it in the documentation panel const tooltip = Autocompleter.asHoverTooltip({ position: context.pos, message: result, @@ -47,9 +47,6 @@ export async function completer( documentation: tooltip.html ?? null, }); } - if (tooltip) { - return null; - } return Autocompleter.asCompletionResult(context.pos, result); } diff --git a/marimo/_runtime/complete.py b/marimo/_runtime/complete.py index afc53a82d2b..144f74ed069 100644 --- a/marimo/_runtime/complete.py +++ b/marimo/_runtime/complete.py @@ -313,7 +313,7 @@ def complete( glbls: dict[str, Any], glbls_lock: threading.RLock, stream: Stream, - docstrings_limit: int = 80, + docstrings_limit: int = 100, timeout: float | None = None, prefer_interpreter_completion: bool = False, ) -> None: