From fcb61280f29328da712a4b53e1b77dc3ed242985 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Tue, 17 Aug 2021 00:30:33 +0600 Subject: [PATCH] config: Add diff and diagnostics components to default config --- README.md | 3 ++- doc/lualine.txt | 3 ++- lua/lualine/config.lua | 3 ++- lua/tests/spec/config_spec.lua | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e706e1b..9e45fa6 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,8 @@ require'lualine'.setup { }, sections = { lualine_a = {'mode'}, - lualine_b = {'branch'}, + lualine_b = {'branch', 'diff', + {'diagnostics', sources={'nvim_lsp', 'coc', 'ale'}}}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, lualine_y = {'progress'}, diff --git a/doc/lualine.txt b/doc/lualine.txt index 63e36fa..20c780a 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -48,7 +48,8 @@ Default config~ }, sections = { lualine_a = {'mode'}, - lualine_b = {'branch'}, + lualine_b = {'branch', 'diff', + {'diagnostics', sources={'nvim_lsp', 'coc', 'ale'}}}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, lualine_y = {'progress'}, diff --git a/lua/lualine/config.lua b/lua/lualine/config.lua index ad2c189..d6f0891 100644 --- a/lua/lualine/config.lua +++ b/lua/lualine/config.lua @@ -10,7 +10,8 @@ local config = { }, sections = { lualine_a = {'mode'}, - lualine_b = {'branch'}, + lualine_b = {'branch', 'diff', + {'diagnostics', sources={'nvim_lsp', 'coc', 'ale'}}}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, lualine_y = {'progress'}, diff --git a/lua/tests/spec/config_spec.lua b/lua/tests/spec/config_spec.lua index 472b859..eb66c0d 100644 --- a/lua/tests/spec/config_spec.lua +++ b/lua/tests/spec/config_spec.lua @@ -109,7 +109,8 @@ describe('config parsing', function() config = config_module.apply_configuration(config) local lualine_default_sections = { lualine_a = {'mode'}, - lualine_b = {'branch'}, + lualine_b = {'branch', 'diff', + {'diagnostics', sources={'nvim_lsp', 'coc', 'ale'}}}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, lualine_y = {'progress'},