From 1cc688b6c349c31367a30d8ba4727df9043dd857 Mon Sep 17 00:00:00 2001 From: zackartz Date: Tue, 19 Mar 2024 12:02:47 -0400 Subject: [PATCH] 216 current 2024-03-19 12:02:39 24.05.20240316.c75037b 6.8.0-zen1 * --- modules/home-manager/default.nix | 4 ++ modules/home-manager/nvconfig.lua | 106 ++++++++++++++++++++++++++++++ modules/home-manager/vim.nix | 2 + 3 files changed, 112 insertions(+) create mode 100644 modules/home-manager/nvconfig.lua diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 8bf842c..9d48927 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -149,6 +149,10 @@ }; }; + home.file.".config/nvim/nvconfig.lua" = { + source = ./nvconfig.lua; + }; + programs.nixvim = ./vim.nix; # Let Home Manager install and manage itself. diff --git a/modules/home-manager/nvconfig.lua b/modules/home-manager/nvconfig.lua new file mode 100644 index 0000000..cfa8d56 --- /dev/null +++ b/modules/home-manager/nvconfig.lua @@ -0,0 +1,106 @@ +local M = {} + +M.ui = { + ------------------------------- base46 ------------------------------------- + -- hl = highlights + hl_add = {}, + hl_override = {}, + changed_themes = {}, + theme_toggle = { "onedark", "one_light" }, + theme = "onedark", -- default theme + transparency = false, + + cmp = { + icons = true, + lspkind_text = true, + style = "default", -- default/flat_light/flat_dark/atom/atom_colored + }, + + telescope = { style = "borderless" }, -- borderless / bordered + + ------------------------------- nvchad_ui modules ----------------------------- + statusline = { + theme = "default", -- default/vscode/vscode_colored/minimal + -- default/round/block/arrow separators work only for default statusline theme + -- round and block will work for minimal theme only + separator_style = "default", + order = nil, + modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + enabled = true, + lazyload = true, + order = { "treeOffset", "buffers", "tabs", "btns" }, + modules = nil, + }, + + nvdash = { + load_on_startup = false, + + header = { + " ▄ ▄ ", + " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", + " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", + " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", + " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", + " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", + "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", + "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", + " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", + }, + + buttons = { + { " Find File", "Spc f f", "Telescope find_files" }, + { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, + { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, + { " Bookmarks", "Spc m a", "Telescope marks" }, + { " Themes", "Spc t h", "Telescope themes" }, + { " Mappings", "Spc c h", "NvCheatsheet" }, + }, + }, + + cheatsheet = { theme = "grid" }, -- simple/grid + + lsp = { + signature = true, + semantic_tokens = false, + }, + + term = { + -- hl = "Normal:term,WinSeparator:WinSeparator", + sizes = { sp = 0.3, vsp = 0.2 }, + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + }, + }, +} + +M.base46 = { + integrations = { + "blankline", + "cmp", + "defaults", + "devicons", + "git", + "lsp", + "mason", + "nvcheatsheet", + "nvdash", + "nvimtree", + "statusline", + "syntax", + "treesitter", + "tbline", + "telescope", + "whichkey", + }, +} + +return vim.tbl_deep_extend("force", M, require "chadrc") diff --git a/modules/home-manager/vim.nix b/modules/home-manager/vim.nix index fa00761..6c804eb 100644 --- a/modules/home-manager/vim.nix +++ b/modules/home-manager/vim.nix @@ -301,6 +301,8 @@ local Terminal = require('toggleterm.terminal').Terminal local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = "float" }) + vim.g.base46_cache = vim.fn.stdpath('data') .. '/base46_cache/' + function _lazygit_toggle() lazygit:toggle() end