onsails/lspkind.nvim

VS Code–style pictograms for Neovim completion items

1,695

stars

100

commits

Lua

primary language

Jan 29, 2026

updated

lsp
lua
neovim
nvim

README

lspkind.nvim

VS Code–style pictograms for Neovim completion items

GitHub Stars License Neovim

lspkind.nvim adds a clear, consistent iconography layer to Neovim’s completion UI (LSP, snippets, paths, etc.). It improves scanability of completion menus, making intent and item type obvious at a glance.

Screenshot nvim-compe, vim-vsnip, vim-vsnip-integ, jellybeans-nvim


Features

  • Readable completion menus with VS Code–like pictograms
  • Drop-in integration with nvim-cmp via lspkind.cmp_format
  • Two presets out of the box: default (Nerd Fonts) and codicons
  • Fully customizable symbol map per kind and per external source
  • Zero heavy deps; tiny footprint and straightforward Lua API

Requirements


Configuration

Option 1: vanilla Neovim LSP

Wherever you configure lsp put the following lua command:

-- setup() is also available as an alias
require('lspkind').init({
    -- defines how annotations are shown
    -- default: symbol
    -- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
    mode = 'symbol_text',

    -- default symbol map
    -- can be either 'default' (requires nerd-fonts font) or
    -- 'codicons' for codicon preset (requires vscode-codicons font)
    --
    -- default: 'default'
    preset = 'codicons',

    -- override preset symbols
    --
    -- default: {}
    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 = "",
    },
})

Option 2: nvim-cmp

local lspkind = require('lspkind')
cmp.setup {
  formatting = {
    fields = { 'abbr', 'icon', 'kind', 'menu' },
    format = lspkind.cmp_format({
      maxwidth = {
        -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
        -- can also be a function to dynamically calculate max width such as
        -- menu = function() return math.floor(0.45 * vim.o.columns) end,
        menu = 50, -- leading text (labelDetails)
        abbr = 50, -- actual suggestion item
      },
      ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
      show_labelDetails = true, -- show labelDetails in menu. Disabled by default

      -- The function below will be called before any actual modifications from lspkind
      -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
      before = function (entry, vim_item)
        -- ...
        return vim_item
      end
    })
  }
}

Option 3: blink.cmp

completion = {
  menu = {
    draw = {
      components = {
        kind_icon = {
          text = function(ctx)
            return require('lspkind').symbol_map[ctx.kind] or ''
          end,
        },
      },
    },
  },
}

diaglist.nvim – live render workspace diagnostics in quickfix with current buf errors on top, buffer diagnostics in loclist

Contributors

onsails

55 commits

eeeXun

14 commits

leiserfg

3 commits

wbthomason

3 commits

onsails/lspkind.nvim

VS Code–style pictograms for Neovim completion items

1,695

stars

100

commits

Lua

primary language

Jan 29, 2026

updated

lsp
lua
neovim
nvim

README

lspkind.nvim

VS Code–style pictograms for Neovim completion items

GitHub Stars License Neovim

lspkind.nvim adds a clear, consistent iconography layer to Neovim’s completion UI (LSP, snippets, paths, etc.). It improves scanability of completion menus, making intent and item type obvious at a glance.

Screenshot nvim-compe, vim-vsnip, vim-vsnip-integ, jellybeans-nvim


Features

  • Readable completion menus with VS Code–like pictograms
  • Drop-in integration with nvim-cmp via lspkind.cmp_format
  • Two presets out of the box: default (Nerd Fonts) and codicons
  • Fully customizable symbol map per kind and per external source
  • Zero heavy deps; tiny footprint and straightforward Lua API

Requirements


Configuration

Option 1: vanilla Neovim LSP

Wherever you configure lsp put the following lua command:

-- setup() is also available as an alias
require('lspkind').init({
    -- defines how annotations are shown
    -- default: symbol
    -- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
    mode = 'symbol_text',

    -- default symbol map
    -- can be either 'default' (requires nerd-fonts font) or
    -- 'codicons' for codicon preset (requires vscode-codicons font)
    --
    -- default: 'default'
    preset = 'codicons',

    -- override preset symbols
    --
    -- default: {}
    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 = "",
    },
})

Option 2: nvim-cmp

local lspkind = require('lspkind')
cmp.setup {
  formatting = {
    fields = { 'abbr', 'icon', 'kind', 'menu' },
    format = lspkind.cmp_format({
      maxwidth = {
        -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
        -- can also be a function to dynamically calculate max width such as
        -- menu = function() return math.floor(0.45 * vim.o.columns) end,
        menu = 50, -- leading text (labelDetails)
        abbr = 50, -- actual suggestion item
      },
      ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
      show_labelDetails = true, -- show labelDetails in menu. Disabled by default

      -- The function below will be called before any actual modifications from lspkind
      -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
      before = function (entry, vim_item)
        -- ...
        return vim_item
      end
    })
  }
}

Option 3: blink.cmp

completion = {
  menu = {
    draw = {
      components = {
        kind_icon = {
          text = function(ctx)
            return require('lspkind').symbol_map[ctx.kind] or ''
          end,
        },
      },
    },
  },
}

diaglist.nvim – live render workspace diagnostics in quickfix with current buf errors on top, buffer diagnostics in loclist

Contributors

onsails

55 commits

eeeXun

14 commits

leiserfg

3 commits

wbthomason

3 commits

Languages

Lua

100.0%