diff --git a/config/default.nix b/config/default.nix index 10f2fc7..89251d3 100644 --- a/config/default.nix +++ b/config/default.nix @@ -41,6 +41,7 @@ ./snippets/luasnip.nix ./statusline/lualine.nix + ./statusline/staline.nix ./ui/nvim-notify.nix ]; diff --git a/config/statusline/lualine.nix b/config/statusline/lualine.nix index 53e4fb3..2aca8a5 100644 --- a/config/statusline/lualine.nix +++ b/config/statusline/lualine.nix @@ -1,6 +1,6 @@ { plugins.lualine = { - enable = true; + enable = false; alwaysDivideMiddle = true; globalstatus = true; ignoreFocus = ["neo-tree"]; diff --git a/config/statusline/staline.nix b/config/statusline/staline.nix new file mode 100644 index 0000000..6dac249 --- /dev/null +++ b/config/statusline/staline.nix @@ -0,0 +1,66 @@ +{pkgs, ...}: { + extraPlugins = with pkgs.vimUtils; [ + (buildVimPlugin { + pname = "staline.nvim"; + version = "2024-02-05"; + src = pkgs.fetchFromGitHub { + owner = "tamton-aquib"; + repo = "staline.nvim"; + rev = "a53f869278b8b186a5afd6f21680cd103c381599"; + hash = "sha256-GDMKzxFDtQk5LL+rMsxTGTyLv69w5NUd+u19noeO5ws="; + }; + }) + ]; + extraConfigLua = '' + require("staline").setup({ + sections = { + left = { "-mode", " ", "branch" }, + mid = { "lsp_name" }, + right = { "file_name", "line_column" }, + }, + inactive_sections = { + left = { "-mode", " ", "branch" }, + mid = { "lsp_name" }, + right = { "file_name", "line_column" }, + }, + defaults = { + left_separator = " ", + right_separator = " ", + branch_symbol = " ", + mod_symbol = "", + line_column = "[%l/%L]", + inactive_color = "#80a6f2", --#303030 is the default + inactive_bgcolor = "none", + }, + special_table = { + lazy = { "Plugins", "💤 " }, + TelescopePrompt = { "Telescope", " " }, + oil = { "Oil", "󰏇 " }, + lazygit = { "LazyGit", " " }, + }, + mode_icons = { + ["n"] = "NORMAL", + ["no"] = "NORMAL", + ["nov"] = "NORMAL", + ["noV"] = "NORMAL", + ["niI"] = "NORMAL", + ["niR"] = "NORMAL", + ["niV"] = "NORMAL", + ["i"] = "INSERT", + ["ic"] = "INSERT", + ["ix"] = "INSERT", + ["s"] = "INSERT", + ["S"] = "INSERT", + ["v"] = "VISUAL", + ["V"] = "VISUAL", + [""] = "VISUAL", + ["r"] = "REPLACE", + ["r?"] = "REPLACE", + ["R"] = "REPLACE", + ["c"] = "COMMAND", + ["t"] = "TERMINAL", + }, + }) + ''; +} +