From ede1e7cb2b86aa705100086dc71ae19a6edd9016 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 3 Feb 2023 21:50:06 +0300 Subject: [PATCH] feat: reorganize default statusline --- modules/statusline/lualine/config.nix | 55 ++++++++++---- modules/statusline/lualine/config.nix.old | 87 ----------------------- 2 files changed, 42 insertions(+), 100 deletions(-) delete mode 100644 modules/statusline/lualine/config.nix.old diff --git a/modules/statusline/lualine/config.nix b/modules/statusline/lualine/config.nix index 23afc8f..10b8bf0 100644 --- a/modules/statusline/lualine/config.nix +++ b/modules/statusline/lualine/config.nix @@ -17,39 +17,68 @@ with lib; { }; componentSeparator = { - left = mkDefault "⏽"; - right = mkDefault "⏽"; + left = mkDefault ""; + right = mkDefault ""; }; activeSection = { + # left side of the statusline 4 a = mkDefault "{'mode'}"; - b = '' + b = mkDefault '' + { + { + "filename", + color = {bg='none'}, + symbols = {modified = '', readonly = ''}, + }, + } + ''; + c = mkDefault '' { { "branch", - separator = '', + icon = ' •', + separator = { left = '(', right = ')'}, }, - "diff", } ''; - c = mkDefault "{'filename'}"; + # right side of the statusline (x, y, z) x = mkDefault '' { { "diagnostics", - sources = {'nvim_lsp'}, - separator = '', - symbols = {error = '', warn = '', info = '', hint = ''}, + sources = {'nvim_lsp', 'nvim_diagnostic'}, + symbols = {error = '', warn = '', info = '', hint = ''} + }, + } + ''; + y = mkDefault '' + { + { + "fileformat", + color = {bg='none'} + }, + } + ''; + z = mkDefault '' + { + { + "progress", + color = { + bg='none', + fg='lavender' + } + }, + { + "location", + color = {bg='none', fg='lavender'}, }, { "filetype", + color = {bg='none', fg='lavender'}, }, - "fileformat", - "encoding", } ''; - y = mkDefault "{'progress'}"; - z = mkDefault "{'location'}"; }; inactiveSection = { diff --git a/modules/statusline/lualine/config.nix.old b/modules/statusline/lualine/config.nix.old deleted file mode 100644 index 3c98b3b..0000000 --- a/modules/statusline/lualine/config.nix.old +++ /dev/null @@ -1,87 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -with lib; { - config = { - vim.statusline.lualine = { - enable = mkDefault false; - icons = mkDefault true; - theme = mkDefault "auto"; - sectionSeparator = { - left = mkDefault ""; - right = mkDefault ""; - }; - - componentSeparator = { - left = mkDefault "⏽"; - right = mkDefault "⏽"; - }; - - activeSection = { - a = mkDefault "{'mode'}"; - b = mkDefault '' - { - { - "filename", - color = {bg='none'} - }, - } - ''; - c = mkDefault '' - { - { - "branch", - icon = '' - }, - } - ''; - x = mkDefault '' - { - { - "diagnostics", - sources = {'nvim_lsp'}, - separator = '', - symbols = {error = '', warn = '', info = '', hint = ''} - }, - } - ''; - y = mkDefault '' - { - { - "fileformat", - color = {bg='none'} - }, - }, - ''; - z = mkDefault '' - { - { - "progress", - color = {bg='none'} - }, - "location", - { - "filetype", - color = { - bg='none', - fg='lavender' - }, - }, - } - ''; - }; - - inactiveSection = { - a = mkDefault "{}"; - b = mkDefault "{}"; - c = mkDefault "{'filename'}"; - x = mkDefault "{'location'}"; - y = mkDefault "{}"; - z = mkDefault "{}"; - }; - }; - }; -}