Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add icon(s) for markdown headers? #93

Open
hopezh opened this issue Mar 19, 2024 · 1 comment
Open

how to add icon(s) for markdown headers? #93

hopezh opened this issue Mar 19, 2024 · 1 comment

Comments

@hopezh
Copy link

hopezh commented Mar 19, 2024

May I ask if there is a way to customize icons for markdown headers?

The following is what outline.nvim is showing:

2024-03-19 20 43 10

@hedyhli
Copy link

hedyhli commented Jun 5, 2024

Hello, this is nvim-navbuddy.

To configure icons for markdown in outline.nvim, you configure it for outline.nvim. Take a look at this recipe example in the readme:
https://github.com/hedyhli/outline.nvim?tab=readme-ov-file#custom-icons

You can use a symbols.icon_fetcher function to override icons specifically for markdown filetypes.

    symbols = {
      icon_fetcher = function(kind, buf)
        local ft = vim.api.nvim_buf_get_option(buf, "ft")
        if ft == 'markdown' and k == 'String' then
          return ""
        end
        return false -- Fall back to `symbols.icon` table, or `icon_source`
      end,
      icon_source = "lspkind",
    }

In this example I have disabled icons entirely, for markdown filetypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants