1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

Spreadsheet: Show a small inline doc window for the "current" function

If the user is typing in the cell editor and has the cursor in a
function call, try to show a tip for the arguments of that function:
(cursor denoted by `|`)
```
sum(|
```
should show:
```
sum(cell names)
```
in a tooltip-like window below the editor.
This commit is contained in:
AnotherTest 2020-12-28 23:33:16 +03:30 committed by Andreas Kling
parent aa5b43a2bc
commit f606e78556
6 changed files with 180 additions and 3 deletions

View file

@ -32,6 +32,12 @@
namespace Spreadsheet {
struct FunctionAndArgumentIndex {
String function_name;
size_t argument_index { 0 };
};
Optional<FunctionAndArgumentIndex> get_function_and_argument_index(StringView source);
class SheetGlobalObject final : public JS::GlobalObject {
JS_OBJECT(SheetGlobalObject, JS::GlobalObject);