diff --git a/lua/navigator/diagnostics.lua b/lua/navigator/diagnostics.lua index 2c0366a..046fc73 100644 --- a/lua/navigator/diagnostics.lua +++ b/lua/navigator/diagnostics.lua @@ -25,16 +25,16 @@ local diag_hdlr = function(err, method, result, client_id, br, config) item.lnum = v.range.start.line + 1 item.col = v.range.start.character + 1 item.uri = uri - local head = " " + local head = "🐛" if v.severity > 1 then - head = " " + head = "👎" end local bufnr = vim.uri_to_bufnr(uri) vim.fn.bufload(bufnr) local pos = v.range.start local row = pos.line local line = (vim.api.nvim_buf_get_lines(bufnr, row, row + 1, false) or {""})[1] - item.text = head .. tostring(item.lnum) .. ": " .. line .. "  " .. v.message + item.text = head .. line .. " 📛 " .. v.message table.insert(item_list, item) end -- local old_items = vim.fn.getqflist() @@ -53,7 +53,7 @@ M.diagnostic_handler = -- Enable virtual text, override spacing to 0 virtual_text = { spacing = 0, - prefix = " " --' ,   + prefix = "👨" --' ,   }, -- Use a function to dynamically turn signs off -- and on, using buffer local variables @@ -75,7 +75,7 @@ M.show_diagnostic = function() end log(display_items) if #display_items > 0 then - gui.new_list_view({items = display_items, api = '⛑ Diagnostic'}) + gui.new_list_view({items = display_items, api = '🚑 Diagnostic'}) end end end diff --git a/lua/navigator/treesitter.lua b/lua/navigator/treesitter.lua index ad4c659..8ee56a6 100644 --- a/lua/navigator/treesitter.lua +++ b/lua/navigator/treesitter.lua @@ -20,7 +20,7 @@ local match_kinds = { } local get_icon = function(kind) - if match_kinds[kind] == nil then + if kind == nil or match_kinds[kind] == nil then return "🌲" else return match_kinds[kind]