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

nvim nerd font icons #313

Open
AndreM222 opened this issue Oct 17, 2023 · 12 comments
Open

nvim nerd font icons #313

AndreM222 opened this issue Oct 17, 2023 · 12 comments

Comments

@AndreM222
Copy link

What happened

When I use most of nerd fonts the icons always break

What I expected to happen

Font icons to work

Screenshot

image

Left side is how its suppose to look and right is how it looks when I use this theme

Machine Info

  • Vim type (vim/gvim/neovim): Neovim
  • Vim version: 0.9.2
  • OS: Windows
  • Terminal/Terminal Emulator/VTE: Windows Terminal
@benknoble
Copy link
Member

It's not clear what this has to do with the dracula colorscheme, or even what's broken (I can see other icons in the screen that look right?).

@AndreM222
Copy link
Author

It's not clear what this has to do with the dracula colorscheme, or even what's broken (I can see other icons in the screen that look right?).

the left part of the screenshot is from someone else dracula theme. the broken one that is the right one which I am searching which looks like it has been cut down is from this dracula theme. Dracula theme breaks most of nerd font icons.

When I use other themes the icons work flawlessly but when I use this dracula theme then it breaks and starts increasing its size and starts cutting them.

What is breaking it explicitly I don't know. But I do know is in this dracula theme.

Remember: The icons you see working correctly are from someone else dracula theme I am using. The ones that are broken are from this dracula theme

@AndreM222
Copy link
Author

I want to move on to this dracula theme which is the original one but I can not since most icons keep breaking.

@benknoble
Copy link
Member

I'm not sure I understand, but: can you provide links to these other themes where the icons work as you want? Perhaps then we can find out what the difference is.

@AndreM222
Copy link
Author

This is the one I currently use from my nvim setup which icons work.

https://github.com/AndreM222/dracula.nvim

@stnley
Copy link
Contributor

stnley commented Oct 28, 2023

@AndreM222 Have you tried tweaking any settings in the configuration? See :h dracula-configuration.

Knowing what plugin is providing those icons in the cmdline & what highlight group they use could help.

@AndreM222
Copy link
Author

I did long time ago but don't remember since I made the switch.

I will guess might be italics having the problem but I do not know for sure.

@benknoble
Copy link
Member

Here's a list of things that seem to be in the Lua that aren't here (plugin groups excluded):

None of those seem particularly relevant, but you could try them. Otherwise, go through the highlight plugin groups, too.

You can find the Lua colors setup at https://github.com/AndreM222/dracula.nvim/main/lua/dracula/groups.lua

@stnley
Copy link
Contributor

stnley commented Oct 29, 2023

FWIW I was unable to replicate. I use nvim-web-devicons and Nerd Font icons in various places. Attempting to format my cmdline completion as pictured above worked as expected.

@AndreM222
Copy link
Author

@AndreM222 Have you tried tweaking any settings in the configuration? See :h dracula-configuration.

Knowing what plugin is providing those icons in the cmdline & what highlight group they use could help.

I am using

  1. nvim-cmp for the autocompletion,
  2. nvim-web-devicons,
  3. lspkind

@AndreM222
Copy link
Author

AndreM222 commented Nov 14, 2023

This is my setup

local status, kind = pcall(require, "lspkind")
if (not status) then return end

kind.init({
    mode = 'symbol_text',
    preset = 'codicons',
    symbol_map = {
        Text = "󰉿",
        Method = "",
        Function = "󰊕",
        Constructor = "",
        Field = "󰜢",
        Variable = "",
        Class = "",
        Interface = "",
        Module = "",
        Property = "󰜢",
        Unit = "",
        Value = "",
        Enum = "",
        Keyword = "󰌋",
        Snippet = "",
        Color = "",
        File = "󰈙",
        Reference = "󰈇",
        Folder = "󰉋",
        EnumMember = "",
        Constant = "",
        Struct = "󰙅",
        Event = "",
        Operator = "",
        TypeParameter = ""
    },
})

-- Setup Lsp protocol
local protocol = require('vim.lsp.protocol')

protocol.CompletionItemKind = {
    '󰉿', -- Text
    '', -- Method
    '󰊕', -- Function
    '', -- Constructor
    '󰜢', -- Field
    "", -- Variable
    '', -- Class
    '', -- Interface
    '', -- Module
    '󰜢', -- Property
    '', -- Unit
    '', -- Value
    '', -- Enum
    '󰌋', -- Keyword
    '', -- Snippet
    '', -- Color
    '󰈙', -- File
    '󰈇', -- Reference
    '󰉋', -- Folder
    '', -- EnumMember
    '', -- Constant
    '󰙅', -- Struct
    '', -- Event
    '', -- Operator
    '', -- TypeParameter
}

@AndreM222
Copy link
Author

I activated the atlasengine from the windows terminal and it kind of fixed it.

Not completely but by the most of it, it was improved.

image

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

No branches or pull requests

3 participants