update symbol nerdfonts

neovim_0_5
ray-x 3 years ago
parent bbc5fc749c
commit 16259eb4e7

@ -90,6 +90,10 @@ Use <c-e> or `:q!` to kill the floating window, <up/down> to move and <c-o> to o
![incomming](https://github.com/ray-x/files/blob/master/img/navigator/incomming.jpg?raw=true)
### LSP symbol nerdfont/emoji
![nerdfont](https://github.com/ray-x/files/blob/master/img/navigator/icon_nerd.jpg?raw=true)
# Todo
- Early phase, bugs expected

@ -40,7 +40,10 @@ function M._preview_location(opts) --location, width, pos_x, pos_y
--
local range = opts.location.targetRange or opts.location.range
if range.start == nil then print('error invalid range') return end
if range.start == nil then
print("error invalid range")
return
end
local contents = api.nvim_buf_get_lines(bufnr, range.start.line, (range["end"].line or 1) + 10, false)
--
@ -53,7 +56,7 @@ function M._preview_location(opts) --location, width, pos_x, pos_y
local win_opts = {syntax = syntax, width = opts.width, pos_x = opts.offset_x or 0, pos_y = opts.offset_y or 10}
win_opts.items = contents
win_opts.hl_line = opts.lnum - range.start.line
log (opts.lnum, range.start.line, win_opts.hl_line)
log(opts.lnum, range.start.line, win_opts.hl_line)
local w = M.new_preview(win_opts)
return w
@ -119,8 +122,7 @@ function M.new_list_view(opts)
util.open_file_at(l.filename, l.lnum)
end
end,
on_move = opts.on_move or
function(pos)
on_move = opts.on_move or function(pos)
if pos == 0 then
pos = 1
end
@ -130,9 +132,9 @@ function M.new_list_view(opts)
if l.uri == nil then
l.uri = "file:///" .. l.filename
end
return M.preview_uri(
{uri = l.uri, width = width, lnum = l.lnum, col = l.col, offsetx = 0, offset_y = offset_y}
)
return M.preview_uri(
{uri = l.uri, width = width, lnum = l.lnum, col = l.col, offsetx = 0, offset_y = offset_y}
)
end
}
)

@ -87,34 +87,7 @@ local SymbolKind = {
}
local SymbolItemKind = {
"",
"",
"",
"",
"",
"ƒ ",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
}
"", "", "", "", "", "ƒ ", "", "", "", "𝕰 ", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
local lspkind = {}
function lspkind.comp_kind(kind)

Loading…
Cancel
Save