Allow completion detail to accept a Node #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nchen63-patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Allows more complex styling of the text inside the completion detail.
What kind of styling are you planning to use this for? I'm somewhat weary of adding complex data structures like DOM nodes to completion objects, since when there are a lot of completions that could easily become a performance issue.
I’d like to add the type’s name with different colors for different types
and a short description in a different font. Since this is opt-in, we can
test for perf issues and it won’t affect other people who don’t use it. CM5
had the ability to do this, and having this allows us to migrate in a more
straightforward way.
On Sun, Sep 11, 2022 at 11:41 PM Marijn Haverbeke @.***>
wrote:
optionClasscan be used to add additional classes to the completion element based on its content (and thus to style the label and the detail text in a custom way). Would that help?It looks like this gives the ability to add a class for the whole
completion, but not the ability to have separate styles within the detail
text (in my case, the type name and description).
On Tue, Sep 13, 2022 at 5:42 AM Marijn Haverbeke @.***>
wrote:
Right, but those already have other classes (
cm-completionLabelandcm-completionInfo) that you can target with a scoped rule, no?Here's some examples of what I would like to do, which I can't do by using the other classes:
I see.
addToOptionsis what you want there, I think. Add a new element to options that is rendered based on some extra information you put in the completion object.Looks like this is what I need. Thanks.
On Tue, Sep 13, 2022 at 9:53 PM Marijn Haverbeke @.***>
wrote:
Pull request closed