fix: diagnostics component in nvim-0.5 (#476)

This commit is contained in:
Shadman 2021-12-10 06:00:06 +06:00 committed by GitHub
parent 4231b63196
commit f4ab5b56da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -137,7 +137,7 @@ ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
ins_left {
'diagnostics',
sources = { 'nvim_lsp' },
sources = { 'nvim_diagnostic' },
symbols = { error = '', warn = '', info = '' },
diagnostics_color = {
color_error = { fg = colors.red },

View File

@ -58,7 +58,7 @@ function M:init(options)
print 'no sources for diagnostics configured'
return ''
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
if name == 'nvim_lsp' then
self.options.sources[i] = 'nvim_diagnostic'

View File

@ -32,10 +32,7 @@ describe('Lualine', function()
end,
icon = '',
},
{
'diagnostics',
sources = { 'nvim_lsp', 'coc' },
},
'diagnostics',
},
lualine_c = { 'filename' },
lualine_x = { 'encoding', 'fileformat', 'filetype' },