Skip to content

Commit

Permalink
fix(lsp): properly check that diagnostics virtual_text is a table. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke authored and joshmedeski committed Sep 1, 2023
1 parent c5f31aa commit b286dc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazyvim/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ return {
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end

if opts.diagnostics.virtual_text.prefix == "icons" then
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and ""
or function(diagnostic)
local icons = require("lazyvim.config").icons.diagnostics
Expand Down

0 comments on commit b286dc4

Please sign in to comment.