-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove 'help-circle.svg' (question mark) icon from unknown autocomple…
…tions (#50) * remove 'help-circle' icon for unknown completion items in popupmenu * Remove unnecessary comments * Remove (more) unnecessary comments * This commit changes the behavior of unknown completions. Unknown completions in the pmenu now show icons if one or more completions' kinds in the pmenu are known (to gnvim). This is done by iterating throughout the items in the pmenu when necessary to check if their completion kind is known (to gnvim). * Refactor previous changes Some notable changes in this commit include the additoin of the 'CompletionItemKind' enum to nvim_bridge.rs per vhakulinen's suggestion, in addition to changing the 'CompletionItemWidgetWrap::create' function to take a reference to the other items in the popupmenu. That function then checks whether or not any other items in the pmenu have icons to determine if it should use an icon for the created 'CompletionItemWidgetWrap' object if it's kind is unknown. I have also refactored `get_icon_pixbuf` and `get_icon_name_for_kind` to take a reference to a 'CompletionItemKind' instead of a 'str'. * Refactor to use variable * Refactor to use `show_kind` variable * Refactor with changes requested by @vhakulinen * Add less padding when all completion items are unknown. * Avoid unnecessary clone * Add padding to `info` when kind is not shown
- Loading branch information
1 parent
b357176
commit ed21346
Showing
4 changed files
with
155 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters