@@ -2,7 +2,7 @@ local ot = {}
22local api , fn = vim .api , vim .fn
33--- @diagnostic disable-next-line : deprecated
44local uv = vim .version ().minor >= 10 and vim .uv or vim .loop
5- local kind = require (' lspsaga.lspkind' ).kind
5+ local get_kind_icon = require (' lspsaga.lspkind' ).get_kind_icon
66local config = require (' lspsaga' ).config
77local util = require (' lspsaga.util' )
88local symbol = require (' lspsaga.symbol' )
@@ -124,8 +124,9 @@ function ot:parse(symbols, curline)
124124 end
125125 end
126126
127+ local hl , icon = unpack (get_kind_icon (node .kind ))
127128 buf_set_extmark (self .bufnr , ns , row - 1 , # indent - 2 , {
128- virt_text = { { kind [ node . kind ][ 2 ] , ' Saga' .. kind [ node . kind ][ 1 ] } },
129+ virt_text = { { icon , ' Saga' .. hl } },
129130 virt_text_pos = ' overlay' ,
130131 })
131132 local inlevel = 4 + 2 * level
@@ -214,7 +215,7 @@ function ot:collapse(node, curlnum)
214215 local tmp = node .next
215216
216217 while tmp do
217- local icon = kind [ tmp .value .kind ][ 2 ]
218+ local hl , icon = unpack ( get_kind_icon ( tmp .value .kind ))
218219 local level = tmp .value .inlevel
219220 buf_set_lines (
220221 self .bufnr ,
@@ -229,7 +230,7 @@ function ot:collapse(node, curlnum)
229230 tmp .value .expand = true
230231 end
231232 buf_set_extmark (self .bufnr , ns , row , level - 2 , {
232- virt_text = { { icon , ' Saga' .. kind [ tmp . value . kind ][ 1 ] } },
233+ virt_text = { { icon , ' Saga' .. hl } },
233234 virt_text_pos = ' overlay' ,
234235 })
235236 local has_child = tmp .next and tmp .next .value .inlevel > level
0 commit comments