From ab8b139eb9f2ce07ea67f99ca5922039017e2bd3 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 4 Feb 2024 21:08:28 +0800 Subject: [PATCH] nixvimConfigs/trovebelt/setups/ui: init --- configs/nixvim/trovebelt/default.nix | 1 + configs/nixvim/trovebelt/modules/default.nix | 1 + .../nixvim/trovebelt/modules/setups/ui.nix | 61 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 configs/nixvim/trovebelt/modules/setups/ui.nix diff --git a/configs/nixvim/trovebelt/default.nix b/configs/nixvim/trovebelt/default.nix index 2e4a2089..7ff06336 100644 --- a/configs/nixvim/trovebelt/default.nix +++ b/configs/nixvim/trovebelt/default.nix @@ -6,6 +6,7 @@ config = { nixvimConfigs.trovebelt.setups = { lsp.enable = true; + ui.enable = true; }; # Some general settings. diff --git a/configs/nixvim/trovebelt/modules/default.nix b/configs/nixvim/trovebelt/modules/default.nix index 845b0a37..e2cf1cf2 100644 --- a/configs/nixvim/trovebelt/modules/default.nix +++ b/configs/nixvim/trovebelt/modules/default.nix @@ -1,5 +1,6 @@ { imports = [ ./setups/lsp.nix + ./setups/ui.nix ]; } diff --git a/configs/nixvim/trovebelt/modules/setups/ui.nix b/configs/nixvim/trovebelt/modules/setups/ui.nix new file mode 100644 index 00000000..f2e41c46 --- /dev/null +++ b/configs/nixvim/trovebelt/modules/setups/ui.nix @@ -0,0 +1,61 @@ +{ config, lib, ... }: + +let + nixvimCfg = config.nixvimConfigs.trovebelt; + cfg = nixvimCfg.setups.ui; +in +{ + options.nixvimConfigs.trovebelt.setups.ui.enable = + lib.mkEnableOption "configuration for UI-related settings and plugins"; + + config = lib.mkIf cfg.enable { + # Set the colorscheme. Take note, we'll set in the default since this NixVim configuration + colorschemes = lib.mkDefault { gruvbox.enable = true; }; + + # Make it so that terminal GUI colors are au natural. + options.termguicolors = true; + + # Show locations you're supposed to be copying from the internet (or your + # own code). + options.number = true; + + # Make it easy to count. + options.relativenumber = true; + + # Make it easy to identify your cursor. + options.cursorline = true; + + # Conceal all of the hidden weapons (or distractions). + options.conceallevel = 1; + + # Show them hidden suckers. + options.list = true; + options.listchars = { + tab = "↦ *"; + trail = "·"; + nbsp = "%"; + }; + + # Taste the rainbow delimiters. + plugins.rainbow-delimiters.enable = nixvimCfg.setups.treesitter.enable; + + # Enable them status bars. + plugins.lualine = { + enable = true; + iconsEnabled = true; + globalstatus = true; + alwaysDivideMiddle = true; + + # Disable the section separators. + sectionSeparators = { + left = ""; + right = ""; + }; + + sections = { + lualine_a = [ "mode" ]; + lualine_z = [ "location" ]; + }; + }; + }; +}