aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/editor/neovim/plugins/config
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-10-11 23:30:53 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-10-11 23:30:53 +0530
commit35563f4b7c2e9a5ff8c58af6b0352ff1d88e7c02 (patch)
tree9af66d2c281851b798d2bba5a9c2cfe1ab7c96e0 /modules/tools/editor/neovim/plugins/config
parent5f0f7da817e6e473c2d92d5c3b7394306b8b936c (diff)
downloadhome-manager-config-35563f4b7c2e9a5ff8c58af6b0352ff1d88e7c02.tar.gz
home-manager-config-35563f4b7c2e9a5ff8c58af6b0352ff1d88e7c02.zip
Making neovim lualine statusbar more consistent with the system theme.
Diffstat (limited to 'modules/tools/editor/neovim/plugins/config')
-rw-r--r--modules/tools/editor/neovim/plugins/config/default.nix4
-rw-r--r--modules/tools/editor/neovim/plugins/config/lualine.lua5
-rw-r--r--modules/tools/editor/neovim/plugins/config/lualine.mustache.lua61
3 files changed, 64 insertions, 6 deletions
diff --git a/modules/tools/editor/neovim/plugins/config/default.nix b/modules/tools/editor/neovim/plugins/config/default.nix
index 81407d7..bf8b0ef 100644
--- a/modules/tools/editor/neovim/plugins/config/default.nix
+++ b/modules/tools/editor/neovim/plugins/config/default.nix
@@ -13,7 +13,9 @@ ${builtins.readFile (config.scheme {
in
''
${builtins.readFile ./comment.lua}
-${builtins.readFile ./lualine.lua}
+${builtins.readFile (config.scheme {
+ template = builtins.readFile ./lualine.mustache.lua;
+})}
${import ./treesitter.nix { inherit config; }}
${builtins.readFile (config.scheme {
template = builtins.readFile ./base16.mustache.lua;
diff --git a/modules/tools/editor/neovim/plugins/config/lualine.lua b/modules/tools/editor/neovim/plugins/config/lualine.lua
deleted file mode 100644
index ba2eda6..0000000
--- a/modules/tools/editor/neovim/plugins/config/lualine.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-require("lualine").setup {
- options = {
- globalstatus = true,
- },
-};
diff --git a/modules/tools/editor/neovim/plugins/config/lualine.mustache.lua b/modules/tools/editor/neovim/plugins/config/lualine.mustache.lua
new file mode 100644
index 0000000..bf4f1d1
--- /dev/null
+++ b/modules/tools/editor/neovim/plugins/config/lualine.mustache.lua
@@ -0,0 +1,61 @@
+local lualine_theme = {
+ normal = {
+ a = { fg = "#{{base0D-hex}}", bg = "none", gui = "bold" },
+ b = { fg = "#{{base05-hex}}", bg = "none" },
+ c = { fg = "#{{base05-hex}}", bg = "none" },
+ },
+ insert = {
+ a = { fg = "#{{base0B-hex}}", bg = "none", gui = "bold" },
+ },
+ visual = {
+ a = { fg = "#{{base0E-hex}}", bg = "none", gui = "bold" },
+ },
+ replace = {
+ a = { fg = "#{{base08-hex}}", bg = "none", gui = "bold" },
+ },
+ command = {
+ a = { fg = "#{{base0A-hex}}", bg = "none", gui = "bold" },
+ },
+ inactive = {
+ a = { fg = "#{{base04-hex}}", bg = "none" },
+ b = { fg = "#{{base04-hex}}", bg = "none" },
+ c = { fg = "#{{base04-hex}}", bg = "none" },
+ },
+};
+
+local function macro_recording()
+ local recording_register = vim.fn.reg_recording()
+ if recording_register ~= "" then
+ return "@" .. recording_register
+ else
+ return ""
+ end
+end
+
+require("lualine").setup {
+ options = {
+ icons_enabled = true,
+ theme = lualine_theme,
+ section_separators = "",
+ component_separators = "",
+ },
+ sections = {
+ lualine_a = { "mode" },
+ lualine_b = {
+ "branch",
+ {
+ "diff",
+ colored = true,
+ symbols = {
+ added = " ",
+ modified = " ",
+ removed = " ",
+ }
+ }
+ },
+ lualine_c = { "filename" },
+ lualine_x = { macro_recording, "encoding", "fileformat", "filetype" },
+ lualine_y = { "progress" },
+ lualine_z = { "location" },
+ },
+};