You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project using Ace and would love to utilize the Doc Tooltip in the autocompletion feature.
Unfortunately the Typescript definitions in ace.d.ts do not have the required definitions. As I have not found any documentation about this feature, I started to read the code to find how to implement that Tooltip for my completer. While reading the code I might have found some potential issues.
Expected Behavior
Have proper Type Definitions and implementations to use Doc Tooltip in custom Completer.
Current Behavior
In autocomplete.js the updateDocTooltip() uses .some() to iterate over an array of completers to find a completer that has a getDocTooltip() and returns a value for the selected item. Either, the getDocTooltip() (currently the only one is defined in language_tools.js) should return a value (string or {docHTML: string} or {docText: string}) to truly utilize the .some() or it should be a .forEach() instead.
The getDocTooltip() should either be defined in the Completer in ace.d.ts too, or in theory it could be replaced with directly defining docHTML/docText in the Completition Item in language_tools.js.
Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
1.13.1
The text was updated successfully, but these errors were encountered:
Describe the bug
I am working on a project using Ace and would love to utilize the Doc Tooltip in the autocompletion feature.
Unfortunately the Typescript definitions in
ace.d.ts
do not have the required definitions. As I have not found any documentation about this feature, I started to read the code to find how to implement that Tooltip for my completer. While reading the code I might have found some potential issues.Expected Behavior
Have proper Type Definitions and implementations to use Doc Tooltip in custom Completer.
Current Behavior
In autocomplete.js the
updateDocTooltip()
uses.some()
to iterate over an array ofcompleters
to find a completer that has agetDocTooltip()
and returns a value for the selected item. Either, thegetDocTooltip()
(currently the only one is defined in language_tools.js) should return a value (string
or{docHTML: string}
or{docText: string}
) to truly utilize the.some()
or it should be a.forEach()
instead.Reproduction Steps
None.
Possible Solution
I would love to have the
Completion
inace.d.ts
include thedocHTML?: string
and/ordocText?: string
fields that could be used directly.The
getDocTooltip()
should either be defined in theCompleter
inace.d.ts
too, or in theory it could be replaced with directly defining docHTML/docText in the Completition Item inlanguage_tools.js
.Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
1.13.1
The text was updated successfully, but these errors were encountered: