SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
762 stars 30 forks source link

icons cannot be overriden #77

Closed litoj closed 1 year ago

litoj commented 1 year ago

The mappings do get applied, so the icons in there should work too, right?

local M = {
    'SmiteshP/nvim-navbuddy',
    dependencies = {
        'SmiteshP/nvim-navic',
        'MunifTanjim/nui.nvim',
    },
    event = 'VeryLazy',
}
function M.config()
    local nb = require 'nvim-navbuddy'
    local act = require 'nvim-navbuddy.actions'
    nb.setup {
        icons = {
            [1] = '󰈔 ', -- File
            [2] = '󰅩 ', -- Module
            [3] = '󰅩 ', -- Namespace
            [4] = '󰅩 ', -- Package
            [5] = ' ', -- Class
            [6] = '󰆧 ', -- Method
            [7] = ' ', -- Property
            [8] = ' ', -- Field
            [9] = ' ', -- Constructor
            [10] = ' ', -- Enum
            [11] = ' ', -- Interface
            [12] = '󰊕 ', -- Function
            [13] = ' ', -- Variable
            [14] = '󰏿 ', -- Constant
            [15] = '󰉾 ', -- String
            [16] = '󰎠 ', -- Number
            [17] = '◩ ', -- Boolean
            [18] = '󰅪 ', -- Array
            [19] = '󰅩 ', -- Object
            [20] = ' ', -- Key
            [21] = '󰟢 ', -- Null
            [22] = ' ', -- EnumMember
            [23] = ' ', -- Struct
            [24] = ' ', -- Event
            [25] = ' ', -- Operator
            [26] = ' ', -- TypeParameter
            [255] = ' ', -- Macro
        },
        lsp = { auto_attach = true },
        mappings = {
            ['<Left>'] = act.parent(),
            ['<Right>'] = act.children(),
        },
    }
    map({ 'n', 'i' }, '<M-t>', nb.open)
end
return M
litoj commented 1 year ago

I was looking into the source code and modifying that. Still weird though - why have two different ways to denote the icons? Sorry for the spam.