ThomasDKim
ThomasDKim

Reputation: 327

Neovim - using patched nerdfont but icon not working

I am using neovim 0.9. I liked JetBrains Mono font so I downloaded the nerd font patched JetBrains font and installed on my Linux Mint 21.1. All is well except when there is an error, neovim displays this weird icon if the linter/checker gets an error.

How can I fix this?

enter image description here

Update 6/13/2023.

I think I am missing an icon set. Do you know where I can get these icons?

enter image description here

Upvotes: 0

Views: 2737

Answers (2)

ThomasDKim
ThomasDKim

Reputation: 327

Answering my own question. I've installed the font manager app. it shows all icons attached to the nerd font. I've picked few and copy / paste into the file. It's working now.

Upvotes: 1

lcheylus
lcheylus

Reputation: 2423

To display icons linter/checker/LSP messages, you could configure Neovim diagnostics.

My Neovim Lua configuration for diagnostic with icons for Error, Warn, Hint, Info:

-- Configuration for diagnostics
local signs = {
  { name = 'DiagnosticSignError', text = '' },
  { name = 'DiagnosticSignWarn', text = '' },
  { name = 'DiagnosticSignHint', text = '' },
  { name = 'DiagnosticSignInfo', text = '' },
}

for _, sign in ipairs(signs) do
  vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = '' })
end

local config = {
  signs = {
    active = signs, -- show signs
  },
  update_in_insert = false,
  underline = true,
  severity_sort = true,
  float = {
    focusable = true,
    style = 'minimal',
    border = 'single',
    source = 'always',
    header = 'Diagnostic',
    prefix = '',
  },
}

vim.diagnostic.config(config)

Upvotes: 1

Related Questions