Skip to content

Commit aab50ee

Browse files
committed
feat: update configure style
1 parent b313f8b commit aab50ee

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

autoload/easycomplete/sources/path.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ function! s:GetWrappedFileAndDirsList(rlist, fpath, base)
120120
call add(result_with_kind, {"word": item[strwidth(l:pfx):] . "/", "abbr":item, "menu" : dir_menu, "kind": ""})
121121
else
122122
call add(result_with_kind, {"word": item[strwidth(l:pfx):] . "/", "abbr":item,
123-
\ "menu" : dir_menu, "kind": "" })
123+
\ "menu" : dir_menu, "kind": g:easycomplete_lsp_type_font["folder"] })
124124
endif
125125
else
126126
if g:easycomplete_nerd_font == 0
127127
call add(result_with_kind, {"word": item[strwidth(l:pfx):], "abbr":item,"menu" : file_menu, "kind":""})
128128
else
129129
call add(result_with_kind, {"word": item[strwidth(l:pfx):], "abbr": item,
130130
\ "menu" : file_menu,
131-
\ "kind": ""
131+
\ "kind": g:easycomplete_lsp_type_font["file"]
132132
\ })
133133
endif
134134
endif

plugin/easycomplete.vim

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
let kind_icons = g:easycomplete_kind_icons
3131

3232
if g:easycomplete_nerd_font == 1
33-
let g:easycomplete_menu_skin = {
33+
let l_menu_skin = {
3434
\ "buf": {
3535
\ "kind":get(kind_icons, "buf", ""),
3636
\ "menu": g:easycomplete_menu_abbr ? "Text" : "text"
@@ -52,18 +52,27 @@ if g:easycomplete_nerd_font == 1
5252
\ "menu": g:easycomplete_menu_abbr ? "CMD" : "cmdline"
5353
\ }
5454
\ }
55-
let g:easycomplete_sign_text = {
56-
\ 'error': "",
57-
\ 'warning': "",
58-
\ 'information': '',
59-
\ 'hint': ''
60-
\ }
55+
if !exists("g:easycomplete_menu_skin")
56+
let g:easycomplete_menu_skin = l_menu_skin
57+
else
58+
call extend(l_menu_skin, g:easycomplete_menu_skin)
59+
let g:easycomplete_menu_skin = l_menu_skin
60+
endif
61+
62+
if !exists("g:easycomplete_sign_text")
63+
let g:easycomplete_sign_text = {
64+
\ 'error': "",
65+
\ 'warning': "",
66+
\ 'information': '',
67+
\ 'hint': ''
68+
\ }
69+
endif
6170
let g:easycomplete_lsp_type_font = {
6271
\ 'class': get(kind_icons, "class", ""), 'color': get(kind_icons, "color", ""),
6372
\ 'constant': get(kind_icons, "constant", ""), 'constructor': get(kind_icons, "constructor", ""),
6473
\ 'enum': get(kind_icons, "enum", ""), 'enummember': get(kind_icons, "enummember", ""),
6574
\ 'field': get(kind_icons, "field", ""), 'file': get(kind_icons, "file", ''),
66-
\ 'folder': get(kind_icons, "folder", ""), 'function': get(kind_icons, "function", "󰊕"),
75+
\ 'folder': get(kind_icons, "folder", ""), 'function': get(kind_icons, "function", "󰊕"),
6776
\ 'interface': get(kind_icons, "interface", ""), 'keyword': get(kind_icons, "keyword", ""),
6877
\ 'snippet': get(kind_icons, "snippet", ""), 'struct': get(kind_icons, "struct", "󰙅"),
6978
\ 'text': get(kind_icons, "text", ""), 'typeparameter': get(kind_icons, "typeparameter", "󰌹"),

0 commit comments

Comments
 (0)