Skip to content

Is there any source for dev-icons #702

Answered by dmitmel
sriramkandukuri asked this question in Q&A
Discussion options

You must be logged in to vote

Is there any source for dev-icons and unicode characters with completion

It's pretty easy to create a source for this, here you go:

local devicons = require('nvim-web-devicons')
cmp.register_source('devicons', {
  complete = function(self, params, callback)
    local items = {}
    for _, icon in pairs(devicons.get_icons()) do
      table.insert(items, {
        label = icon.icon .. '  ' .. icon.name,
        insertText = icon.icon,
        filterText = icon.name,
      })
    end
    callback({ items = items })
  end,
})

is there any alternative for unicode.vim written in lua with nvim-cmp as backend?

Not that I know of any, but this isn't hard to do either - the only thing you reall…

Replies: 1 comment 2 replies

Comment options

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

@zackfall
Comment options

Answer selected by sriramkandukuri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants