VonHeikemen / lsp-zero.nvim

A starting point to setup some lsp related features in neovim.
https://lsp-zero.netlify.app/docs/
MIT License
3.78k stars 96 forks source link

Undercurls to display errors #385

Closed zerogtiger closed 6 months ago

zerogtiger commented 6 months ago

Hello, I couldn't find a setting to change diagnostic error underlines to undercurls. Any pointers?

VonHeikemen commented 6 months ago

That's controlled by your colorscheme. And I believe your terminal emulator has to support it too.

You can change that using the command :highlight. This is a vimscript command, so if you want to use it in lua you'll need to learn about vim.cmd.

Long story short: you could do something like this after you setup your colorscheme.

vim.cmd.highlight('DiagnosticUnderlineError', 'gui=undercurl')

Tip: if you enter command mode and start typing :highlight DiagnosticUnderline then press tab, you'll get a list of valid highlight groups.

zerogtiger commented 6 months ago

Got it working. Thanks!