2021-04-19 02:56:32 +00:00
|
|
|
|
local kind_symbols = {
|
2022-06-01 15:41:26 +00:00
|
|
|
|
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 = ' ',
|
|
|
|
|
Default = '',
|
2021-04-19 02:56:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-04-20 22:07:13 +00:00
|
|
|
|
local CompletionItemKind = {
|
2022-06-01 15:41:26 +00:00
|
|
|
|
' ',
|
|
|
|
|
'𝔉 ',
|
|
|
|
|
'ⓕ ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﴲ ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﰮ ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'𝕰 ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﳅ ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
2021-04-20 22:07:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- A symbol kind.
|
2022-06-01 15:41:26 +00:00
|
|
|
|
-- local SymbolKind = {
|
|
|
|
|
-- File = 1,
|
|
|
|
|
-- Module = 2,
|
|
|
|
|
-- Namespace = 3,
|
|
|
|
|
-- Package = 4,
|
|
|
|
|
-- Class = 5,
|
|
|
|
|
-- Method = 6,
|
|
|
|
|
-- Property = 7,
|
|
|
|
|
-- Field = 8,
|
|
|
|
|
-- Constructor = 9,
|
|
|
|
|
-- Enum = 10,
|
|
|
|
|
-- Interface = 11,
|
|
|
|
|
-- Function = 12,
|
|
|
|
|
-- Variable = 13,
|
|
|
|
|
-- Constant = 14,
|
|
|
|
|
-- String = 15,
|
|
|
|
|
-- Number = 16,
|
|
|
|
|
-- Boolean = 17,
|
|
|
|
|
-- Array = 18,
|
|
|
|
|
-- Object = 19,
|
|
|
|
|
-- Key = 20,
|
|
|
|
|
-- Null = 21,
|
|
|
|
|
-- EnumMember = 22,
|
|
|
|
|
-- Struct = 23,
|
|
|
|
|
-- Event = 24,
|
|
|
|
|
-- Operator = 25,
|
|
|
|
|
-- TypeParameter = 26
|
|
|
|
|
-- }
|
2021-04-19 02:56:32 +00:00
|
|
|
|
|
2021-04-20 22:07:13 +00:00
|
|
|
|
local SymbolItemKind = {
|
2022-06-01 15:41:26 +00:00
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'פּ ',
|
|
|
|
|
'ƒ ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﴲ ',
|
|
|
|
|
' ',
|
|
|
|
|
'𝕰 ',
|
|
|
|
|
'蘒',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﳠ ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
'ﳅ ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
|
|
|
|
' ',
|
2021-05-17 03:15:15 +00:00
|
|
|
|
}
|
2021-04-20 22:07:13 +00:00
|
|
|
|
|
|
|
|
|
local lspkind = {}
|
2022-06-01 15:41:26 +00:00
|
|
|
|
function lspkind.comp_kind(kind)
|
|
|
|
|
return CompletionItemKind[kind] or ''
|
|
|
|
|
end
|
2021-04-19 02:56:32 +00:00
|
|
|
|
|
2022-06-01 15:41:26 +00:00
|
|
|
|
function lspkind.symbol_kind(kind)
|
|
|
|
|
return SymbolItemKind[kind] or ''
|
|
|
|
|
end
|
2021-04-19 02:56:32 +00:00
|
|
|
|
|
2022-06-01 15:41:26 +00:00
|
|
|
|
function lspkind.cmp_kind(kind)
|
|
|
|
|
return kind_symbols[kind] or ''
|
|
|
|
|
end
|
2021-08-26 06:19:03 +00:00
|
|
|
|
|
2022-06-01 15:41:26 +00:00
|
|
|
|
function lspkind.init()
|
|
|
|
|
require('vim.lsp.protocol').CompletionItemKind = CompletionItemKind
|
|
|
|
|
end
|
2021-04-19 02:56:32 +00:00
|
|
|
|
return lspkind
|