onsails/lspkind.nvim

Icons for missing kinds and suggestions for existing kinds

astier opened this issue · 2 comments

Problem

The following kinds are not defined:

  • Field
  • Reference
  • Event
  • Operator
  • TypeParameter

The following kinds are defined but could have better icons:

  • Method ƒ
  • Class

Solutions

I tried to find icons similar to the icons which are used by vscode. As a reference I used the official vscode-icon-reference. Search for symbol-class to find the icon for a class.

  • Field: Completely forgot to search for this one but since it is basically a variable I personally would use the same icon as the Variable-kind. I will leave it to somebody else to search for a better icon.
  • Reference: ⇲                  淚 漏 社 I think is nice and looks similar to vscode.
  • Event:       勞 異 𥉉 ﯓ ﯧ ﯦ ﱥ ﴞ  vscode has
  • Operator:  樂 洛 烈 ﲂ I hopped to find some kind of calculator icon like the vscode symbol where the four operations +-%= are shown but I couldn't find one. I picked for myself.
  • TypeParameter: T    﫳 My favorite is because generic types are usually put in such brackets.
  • Method
  • Class

I have no issues with the Keyword- and Text-kind but here are some alternatives:

  • Keyword:  
  • Text: this looks like the official vscode icon for text but is very small on my computer.

Related

#1
#5
#11

Here's my configuration with a nerd font

require "vim.lsp.protocol".CompletionItemKind = {
  "  (text)",
  "  (method)",
  "  (fun)",
  "  (constructor)",
  "ﰠ  (field)",
  " (var)",
  "ﴯ  (class)",
  "  (interface)",
  "  (module)",
  "ﰠ  (property)",
  "塞 (unit)",
  "  (value)",
  "  (enum)",
  "  (keyword)",
  "  (snippet)",
  "  (color)",
  "  (file)",
  "  (reference)",
  "  (folder)",
  "  (enum-member)",
  "  (constant)",
  "פּ  (struct)",
  "  (event)",
  "  (operator)",
  "   (type-param)"
}

Screen Shot 2021-07-25 at 1 48 43 PM

Here's my configuration with a nerd font

require "vim.lsp.protocol".CompletionItemKind = {
  "  (text)",
  "  (method)",
  "  (fun)",
  "  (constructor)",
  "ﰠ  (field)",
  " (var)",
  "ﴯ  (class)",
  "  (interface)",
  "  (module)",
  "ﰠ  (property)",
  "塞 (unit)",
  "  (value)",
  "  (enum)",
  "  (keyword)",
  "  (snippet)",
  "  (color)",
  "  (file)",
  "  (reference)",
  "  (folder)",
  "  (enum-member)",
  "  (constant)",
  "פּ  (struct)",
  "  (event)",
  "  (operator)",
  "   (type-param)"
}
Screen Shot 2021-07-25 at 1 48 43 PM

@stellarhoof thank you! would you mind adding it as a preset here?