forked from Archives/navigator.lua
update doc symbol
parent
f815e7dfb9
commit
f46d8adf09
@ -1,38 +1,128 @@
|
|||||||
local kind_symbols = {
|
local kind_symbols = {
|
||||||
Text = '',
|
Text = "",
|
||||||
Method = 'ƒ',
|
Method = "ƒ",
|
||||||
Function = '',
|
Function = "",
|
||||||
Constructor = '',
|
Constructor = "",
|
||||||
Field = 'ﴲ',
|
Field = "ﴲ",
|
||||||
Variable = '',
|
Variable = "",
|
||||||
Class = 'פּ',
|
Class = "פּ",
|
||||||
Interface = '蘒',
|
Interface = "蘒",
|
||||||
Module = '',
|
Module = "",
|
||||||
Property = '',
|
Property = "",
|
||||||
Unit = '塞',
|
Unit = "塞",
|
||||||
Value = '',
|
Value = "",
|
||||||
Enum = '了',
|
Enum = "了",
|
||||||
Keyword = '',
|
Keyword = "",
|
||||||
Snippet = '',
|
Snippet = "",
|
||||||
Color = '',
|
Color = "",
|
||||||
File = '',
|
File = "",
|
||||||
Reference = '',
|
Reference = "",
|
||||||
Folder = '',
|
Folder = "",
|
||||||
EnumMember = '',
|
EnumMember = "",
|
||||||
Constant = '',
|
Constant = "",
|
||||||
Struct = ' ',
|
Struct = " ",
|
||||||
Event = 'ﳅ',
|
Event = "ﳅ",
|
||||||
Operator ='',
|
Operator = "",
|
||||||
TypeParameter = '',
|
TypeParameter = "",
|
||||||
Default = '',
|
Default = ""
|
||||||
}
|
}
|
||||||
local CompletionItemKind = {'', 'ƒ', '', '', 'ﴲ', '', '', 'ﰮ', '', '', '', '', '了', '', '', '', '', '', '', '', '', '', 'ﳅ', '', '', ''}
|
|
||||||
|
|
||||||
function lspkind.kind(kind)
|
local CompletionItemKind = {
|
||||||
-- require('vim.lsp.protocol').CompletionItemKind = {'', 'ƒ', '', '', 'ﴲ', '', '', 'ﰮ', '', '', '', '', '了', '', '', '', '', '', '', '', '', '', 'ﳅ', '', '', ''}
|
" ",
|
||||||
return CompletionItemKind[kind]
|
"ƒ ",
|
||||||
end
|
" ",
|
||||||
|
" ",
|
||||||
|
"ﴲ ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"ﰮ ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"了",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"ﳅ ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "
|
||||||
|
}
|
||||||
|
|
||||||
|
-- A symbol kind.
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
local SymbolItemKind = {
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"פּ ",
|
||||||
|
"ƒ ",
|
||||||
|
" ",
|
||||||
|
"ﴲ ",
|
||||||
|
" ",
|
||||||
|
"了",
|
||||||
|
"蘒",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"ﳠ ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"ﳅ ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
""
|
||||||
|
}
|
||||||
|
|
||||||
|
local lspkind = {}
|
||||||
|
function lspkind.comp_kind(kind)
|
||||||
|
return CompletionItemKind[kind] or ""
|
||||||
|
end
|
||||||
|
|
||||||
|
function lspkind.symbol_kind(kind)
|
||||||
|
return SymbolItemKind[kind] or ""
|
||||||
|
end
|
||||||
|
|
||||||
return lspkind
|
return lspkind
|
||||||
|
Loading…
Reference in New Issue