fix: diagnostics component in nvim-0.5 (#476)
This commit is contained in:
parent
4231b63196
commit
f4ab5b56da
|
@ -137,7 +137,7 @@ ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
||||||
|
|
||||||
ins_left {
|
ins_left {
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
sources = { 'nvim_lsp' },
|
sources = { 'nvim_diagnostic' },
|
||||||
symbols = { error = ' ', warn = ' ', info = ' ' },
|
symbols = { error = ' ', warn = ' ', info = ' ' },
|
||||||
diagnostics_color = {
|
diagnostics_color = {
|
||||||
color_error = { fg = colors.red },
|
color_error = { fg = colors.red },
|
||||||
|
|
|
@ -58,7 +58,7 @@ function M:init(options)
|
||||||
print 'no sources for diagnostics configured'
|
print 'no sources for diagnostics configured'
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
if vim.fn.has 'nvim-0.6' then
|
if vim.fn.has 'nvim-0.6' == 1 then
|
||||||
for i, name in ipairs(self.options.sources) do
|
for i, name in ipairs(self.options.sources) do
|
||||||
if name == 'nvim_lsp' then
|
if name == 'nvim_lsp' then
|
||||||
self.options.sources[i] = 'nvim_diagnostic'
|
self.options.sources[i] = 'nvim_diagnostic'
|
||||||
|
|
|
@ -32,10 +32,7 @@ describe('Lualine', function()
|
||||||
end,
|
end,
|
||||||
icon = '',
|
icon = '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
sources = { 'nvim_lsp', 'coc' },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { 'filename' },
|
||||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
|
|
Loading…
Reference in New Issue