Closed doctorfree closed 1 year ago
It may be more appropriate to add the symbol_map
icons in the lspkind
config. I haven't tried that and as far as I can tell they are only used by nvim-cmp
. It's a minor modification, the current configuration looks and works well. So closing this PR or implementing the same thing differently is an ok move.
What is the difference from the current symbol_map for types? Currently there are icons for types, but they are different from the one provided by you:
(Current type icons)
Does it add any missing type icons? I've checked it and didn't notice anything additional that changed icons.
I've been on vacation, just back. It looks like you have the icons defined in lua/utils/icons.lua
so these could be used rather than the ones provided in this PR. However, for some types (e.g. Text) it appears the default lspkind
icon is used. The PR attempts to add icon definitions for types for which the default icon is used. Some of these may be unnecessary, that is, I may have been overly zealous.
The current set of default icons defined in lspkind
is as follows:
default = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
},
Identifying which types are still using the default icon from lspkind
and adding that to the source_mapping
defined in lua/plugins/cmp.lua
could improve the look. This PR is overkill as you point out, some of the types are adequately defined. I think we should close this PR, it's not what you want to do. Rather, identify any types whose icon definition should be replaced with that defined in lua/utils/icons.lua
and add it to source_mapping
(e.g. Text = EcoVim.icons.text
).
I do not have a list of the types still using the default icon.
In
lua/plugins/cmp.lua
the following was overwriting thelspkind
symbol_map
:This PR adds
symbol_map
icons forlspkind
. Completions now show icons for all types as well as source.Thank you for doing this ingenious completion plugin(s) configuration. I borrowed heavily from it for my own config.