Skip to content

Different icons for different filetypes #78

Closed Answered by hedyhli
goerz asked this question in Help
Discussion options

You must be logged in to vote

Hi!

Yes, you can. There's a section in the docs dedicated to customizing this specifically.

In fact, I use this myself:

https://github.com/hedyhli/dotfiles/blob/8b41a2c8135cd579ac7adacb3ca94de993a6b6be/.config/nvim/lua/plugins/outline.lua#L77

    symbols = {
      icon_fetcher = function(k)
        local ft = vim.api.nvim_buf_get_option(require('outline').current.code.buf, "ft")
        -- There can only be kind String in markdown so... let's not have the
        -- eye candy here
        if ft == 'markdown' and k == 'String' then
          return ""
        end
        return false
      end,
      icon_source = "lspkind",
    }

No icons are shown when it's markdown. Falls back to lspkind

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@goerz
Comment options

@hedyhli
Comment options

Answer selected by hedyhli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants