Replies: 2 comments 1 reply
-
|
You'll need to add/override your icon by extension, then may a filetype to it, something like require("nvim-web-devicons").set_icon {
["c"] = {
icon = "x",
color = "#599EFF",
cterm_color = "111",
name = "C"
},
}
require("nvim-web-devicons").set_icon_by_filetype({ cpp = "c", })RE telescope icons, check the telescope :help |
Beta Was this translation helpful? Give feedback.
-
The Two-Step ProcessAs the maintainer explained, you need to:
Solution for TelescopePromptHere's how to set a custom icon for local devicons = require("nvim-web-devicons")
-- Step 1: Define your custom icon
devicons.set_icon {
["telescope"] = {
icon = "🔭", -- or any icon you prefer
color = "#519aba",
cterm_color = "74",
name = "Telescope"
}
}
-- Step 2: Map the filetype to your icon
devicons.set_icon_by_filetype({
TelescopePrompt = "telescope"
})Why
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
My goal is to set a custom icon for
TelescopePromptbuffers however the Filetype function doesn't seem to work.If I use
override_by_extension(commented out) it works just fine but withset_icon_by_filetypeI'm unable to set a custom icon.Here a simple test with
.norgfiles (works only with override_by_extension):Is there a way to set custom icon for buffers like
TelescopePromptinsidesetupfunc?I didn't find something like
override_by_filetypein the docs so I guess this has to be done withset_icon_by_filetypebut for some reason this particular one isn't working for me.Beta Was this translation helpful? Give feedback.
All reactions