summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/lualine.lua
blob: 409c452d76fe3c7fd8939fa4a35d23b59c687b14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
local auto_theme = require("lualine.themes.auto")

local colors = {
  modes = {
    normal = auto_theme.normal.a.bg,
    insert = auto_theme.insert.a.bg,
    visual = auto_theme.visual.a.bg,
    replace = auto_theme.replace.a.bg,
    command = auto_theme.command.a.bg,
    inactive = auto_theme.inactive.a.bg,
  },
  text = {
    dark = auto_theme.normal.a.fg,
    light = auto_theme.normal.c.fg,
  },
  backdrop = auto_theme.normal.c.bg,
}

local custom_auto_theme = {
  normal = {
    a = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
  },
  insert = {
    a = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
  },
  visual = {
    a = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
  },
  replace = {
    a = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
  },
  command = {
    a = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
  },
  inactive = {
    a = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
    b = {bg = colors.backdrop, fg = colors.text.light},
    c = {bg = colors.backdrop, fg = colors.text.light},
    x = {bg = colors.backdrop, fg = colors.text.light},
    y = {bg = colors.backdrop, fg = colors.text.light},
    z = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
  },
};

require('lualine').setup {
  options = {
    theme = custom_auto_theme,
    component_separators = "",
    section_separators = { left = '', right = '' },
  },
  sections = {
    lualine_a = { { 'mode', separator = { left = '', rignt = '' }, right_padding = 2 } },
    lualine_b = { 'filename', 'branch' },
    lualine_c = {
      '%=', --[[ add your center components here in place of this comment ]]
    },
    lualine_x = {},
    lualine_y = { 'filetype', 'progress' },
    lualine_z = {
      { 'location', separator = { left = '', right = '' }, left_padding = 2 },
    },
  },
  inactive_sections = {
    lualine_a = { 'filename' },
    lualine_b = {},
    lualine_c = {},
    lualine_x = {},
    lualine_y = {},
    lualine_z = { 'location' },
  },
  tabline = {},
  extensions = {},
}