(T)im's N(ix) Flake, Multi-Host Configurations for all of my machines! 74k1.sh/
nixos nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(neovim): refactor & remove overhead of config files

74k1 ad17c560 e6197b91

+50 -207
+5 -9
modules/home-manager/shell/neovim/cfg/alpha.lua
··· 3 3 4 4 -- Set header 5 5 dashboard.section.header.val = { 6 - " ", 7 - " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", 8 - " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", 9 - " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", 10 - " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", 11 - " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", 12 - " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", 13 - " ", 6 + "♡ ╱|、 ", 7 + " (˚ˎ。7 ", 8 + " |、˜〵 ", 9 + " じしˍ,)ノ", 14 10 } 15 11 16 12 -- Set menu 17 13 dashboard.section.buttons.val = { 18 14 dashboard.button( "e", " > New file" , ":ene <BAR> startinsert <CR>"), 19 15 dashboard.button( "f", " > Find file", ":Telescope find_files<CR>"), 20 - dashboard.button( "g", "󰯈 > Rip & Tear" , ":Telescope live_grep<CR>"), 16 + dashboard.button( "g", "󰯈 > Grep" , ":Telescope live_grep<CR>"), 21 17 dashboard.button( "r", " > Recent" , ":Telescope oldfiles<CR>"), 22 18 dashboard.button( "q", "󰩈 > Quit NVIM", ":qa<CR>"), 23 19 }
-46
modules/home-manager/shell/neovim/cfg/catppuccin.lua
··· 1 - require("catppuccin").setup({ 2 - flavour = "mocha", -- latte, frappe, macchiato, mocha 3 - background = { -- :h background 4 - light = "latte", 5 - dark = "mocha", 6 - }, 7 - transparent_background = true, 8 - show_end_of_buffer = false, -- show the '~' characters after the end of buffers 9 - term_colors = false, 10 - dim_inactive = { 11 - enabled = false, 12 - shade = "dark", 13 - percentage = 0.15, 14 - }, 15 - no_italic = false, -- Force no italic 16 - no_bold = false, -- Force no bold 17 - no_underline = false, -- Force no underline 18 - styles = { 19 - comments = { "italic" }, 20 - conditionals = { "italic" }, 21 - loops = {}, 22 - functions = {}, 23 - keywords = {}, 24 - strings = {}, 25 - variables = {}, 26 - numbers = {}, 27 - booleans = {}, 28 - properties = {}, 29 - types = {}, 30 - operators = {}, 31 - }, 32 - color_overrides = {}, 33 - custom_highlights = {}, 34 - integrations = { 35 - cmp = true, 36 - gitsigns = true, 37 - nvimtree = true, 38 - telescope = true, 39 - notify = false, 40 - mini = false, 41 - -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) 42 - }, 43 - }) 44 - 45 - -- setup must be called before loading 46 - vim.cmd.colorscheme "catppuccin"
-13
modules/home-manager/shell/neovim/cfg/clipboard-image.lua
··· 1 - require("clipboard-image").setup { 2 - -- Def config for all filetypes 3 - default = { 4 - img_dir = {"%:p:h", "_assets_", "%:t:r"}, 5 - img_name = function() return os.time(os.date("!*t")) end, 6 - }, 7 - markdown = { 8 - img_handler = function(img) 9 - vim.cmd("normal! f[") -- go to [ 10 - vim.cmd("normal! a" .. img.name) 11 - end 12 - } 13 - }
-3
modules/home-manager/shell/neovim/cfg/colorizer.lua
··· 1 - require("colorizer").setup({ 2 - mode = 'foreground'; 3 - })
-1
modules/home-manager/shell/neovim/cfg/copilot-cmp.lua
··· 1 - require("copilot_cmp").setup({})
-19
modules/home-manager/shell/neovim/cfg/copilot-lua.lua
··· 1 - require('copilot').setup({ 2 - panel = { 3 - enabled = false, 4 - }, 5 - suggestion = { 6 - enabled = false, 7 - }, 8 - filetypes = { 9 - yaml = false, 10 - markdown = false, 11 - help = false, 12 - gitcommit = false, 13 - gitrebase = false, 14 - hgcommit = false, 15 - svn = false, 16 - cvs = false, 17 - ["."] = false, 18 - }, 19 - })
-7
modules/home-manager/shell/neovim/cfg/fidget.lua
··· 1 - require("fidget").setup({ 2 - progress = { 3 - display = { 4 - progress_style = "FidgetProgress" 5 - } 6 - } 7 - })
-3
modules/home-manager/shell/neovim/cfg/indentmini.lua
··· 1 - require("indentmini").setup() -- use default config 2 - vim.cmd.highlight('IndentLine guifg=#1e1e2e') 3 - vim.cmd.highlight('IndentLineCurrent guifg=#9399b2')
-11
modules/home-manager/shell/neovim/cfg/nix-update.lua
··· 1 - local nix_update = require("nix-update") 2 - 3 - local opt = {} 4 - 5 - nix_update.setup(opt) 6 - 7 - vim.api.nvim_create_user_command( 8 - "NixUpdate", 9 - nix_update.prefetch_fetch, 10 - {} 11 - )
+45 -95
modules/home-manager/shell/neovim/default.nix
··· 14 14 src = pkgs.fetchFromGitHub { 15 15 owner = "reo101"; 16 16 repo = "nix-update.nvim"; 17 - rev = "5a45a664875660422faa278c28f636888e15707a"; 18 - hash = "sha256-l83H5o6228J6dLB3RHZAz80Cdw7bAF1Kizr+C/9cZOo="; 17 + rev = "d9224e2c5f5a44cbab6d017211a88fdf9674063b"; 18 + hash = "sha256-li3febSwIFL6JZPUFdm3pmRFu2TUv7h3NmyjvrJR5QE="; 19 19 }; 20 20 }; 21 21 vim-log-highlighting = pkgs.vimUtils.buildVimPlugin { ··· 43 43 programs.neovim = { 44 44 enable = true; 45 45 package = pkgs.neovim-unwrapped; 46 + # package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default; 46 47 viAlias = true; 47 48 vimAlias = true; 48 49 vimdiffAlias = true; ··· 62 63 pkgs.emmet-ls # Emmet Language Server (cool snippets) 63 64 pkgs.imagemagick # for image.nvim 64 65 pkgs.curl # for image.nvim remote images 65 - # pkgs.nodejs # for copilot-lua 66 66 ]; 67 67 extraConfig = 68 68 # vim ··· 91 91 92 92 " terminal escape 93 93 lua vim.keymap.set("t", "<esc><esc>", "<C-\\><C-n>") 94 - 95 - " rest 96 - " Autocommands for vim-table-mode 97 - "augroup TableModeSetup 98 - " autocmd! 99 - " autocmd FileType markdown TableModeEnable 100 - " autocmd BufEnter * if &ft != 'markdown' | TableModeDisable | endif 101 - "augroup END 102 - " lua require'./plg/markdown_headings.lua'.init() 103 - "lua vim.cmd("colorscheme yueye") 104 94 ''; 105 95 plugins = with pkgs.vimPlugins; [ 106 96 { ··· 116 106 vim.cmd('colorscheme snqn') 117 107 ''; 118 108 } 119 - inputs.snqn-nvim.packages.${pkgs.stdenv.hostPlatform.system}.default 120 109 # neo-tree-nvim 121 110 # vim-table-mode 122 111 vim-log-highlighting ··· 143 132 vim-dadbod-ui 144 133 vim-nix 145 134 vim-shellcheck 146 - # { 147 - # plugin = base16-nvim; 148 - # type = "lua"; 149 - # config = 150 - # # lua 151 - # '' 152 - # -- All builtin colorschemes can be accessed with |:colorscheme|. 153 - # vim.cmd('colorscheme base16-colors') 154 - # 155 - # -- Alternatively, you can provide a table specifying your colors to the setup function. 156 - # require('base16-colorscheme').setup({ 157 - # base00 = '#07060B', 158 - # base01 = '#1C1B28', 159 - # base02 = '#323246', 160 - # base03 = '#4C4B69', 161 - # base04 = '#72708E', 162 - # base05 = '#BFBDCA', 163 - # base06 = '#EBE9F1', 164 - # base07 = '#FFFFFF', 165 - # base08 = '#FF5487', 166 - # base09 = '#FF9265', 167 - # base0A = '#FFD772', 168 - # base0B = '#54FF80', 169 - # base0C = '#5BD5EA', 170 - # base0D = '#7089FF', 171 - # base0E = '#A878F1', 172 - # base0F = '#CB65E2', 173 - # }) 174 - # 175 - # -- transparent background? 176 - # vim.api.nvim_set_hl(0, "CursorLineNr", { bg = "none" }) 177 - # vim.api.nvim_set_hl(0, "LineNr", { bg = "none" }) 178 - # vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) 179 - # vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) 180 - # vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) 181 - # vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" }) 182 - # ''; 183 - # } 184 - # { 185 - # plugin = yueye-nvim; 186 - # type = "lua"; 187 - # config = 188 - # # lua 189 - # '' 190 - # vim.cmd("colorscheme yueye") 191 - # -- vim.opt.fillchars = { eob = " " } 192 - # -- vim.api.nvim_set_hl(0, "CursorLineNr", { bg = "none" }) 193 - # -- vim.api.nvim_set_hl(0, "LineNr", { bg = "none" }) 194 - # -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) 195 - # -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) 196 - # -- vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) 197 - # -- vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" }) 198 - # ''; 199 - # } 200 135 { 201 136 plugin = mini-ai; 202 137 type = "lua"; ··· 252 187 ''; 253 188 } 254 189 { 190 + plugin = nix-update-nvim; 191 + type = "lua"; 192 + config = 193 + # lua 194 + '' 195 + local nix_update = require("nix-update") 196 + 197 + local opt = {} 198 + 199 + nix_update.setup(opt) 200 + 201 + vim.api.nvim_create_user_command( 202 + "NixUpdate", 203 + nix_update.prefetch_fetch, 204 + {} 205 + ) 206 + ''; 207 + } 208 + { 255 209 plugin = nvim-treesitter.withAllGrammars; 256 210 type = "lua"; 257 211 config = builtins.readFile ./cfg/TSconfig.lua; ··· 267 221 # require('let-it-snow').setup({delay = 50}) 268 222 # ''; 269 223 # } 270 - # { 271 - # plugin = copilot-cmp; 272 - # type = "lua"; 273 - # config = builtins.readFile ./cfg/copilot-cmp.lua; 274 - # } 275 - # { 276 - # plugin = copilot-lua; 277 - # type = "lua"; 278 - # config = builtins.readFile ./cfg/copilot-lua.lua; 279 - # } 280 224 { 281 225 plugin = tiny-inline-diagnostic-nvim; 282 226 type = "lua"; ··· 295 239 { 296 240 plugin = fidget-nvim; 297 241 type = "lua"; 298 - config = builtins.readFile ./cfg/fidget.lua; 242 + config = 243 + # lua 244 + '' 245 + require("fidget").setup({ 246 + progress = { 247 + display = { 248 + progress_style = "FidgetProgress" 249 + } 250 + } 251 + }) 252 + ''; 299 253 } 300 - # { 301 - # plugin = indentmini-nvim; 302 - # type = "lua"; 303 - # config = builtins.readFile ./cfg/indentmini.lua; 304 - # } 305 254 { 306 255 plugin = oil-nvim; 307 256 type = "lua"; 308 257 config = builtins.readFile ./cfg/oil.lua; 309 258 } 310 259 { 311 - plugin = nix-update-nvim; 312 - type = "lua"; 313 - config = builtins.readFile ./cfg/nix-update.lua; 314 - } 315 - # { 316 - # plugin = clipboard-image-nvim; 317 - # type = "lua"; 318 - # config = builtins.readFile ./cfg/clipboard-image.lua; 319 - # } 320 - { 321 260 plugin = img-clip-nvim; 322 261 type = "lua"; 323 262 config = builtins.readFile ./cfg/img-clip.lua; ··· 335 274 { 336 275 plugin = nvim-colorizer-lua; 337 276 type = "lua"; 338 - config = builtins.readFile ./cfg/colorizer.lua; 277 + config = 278 + # lua 279 + '' 280 + require("colorizer").setup({ 281 + mode = 'foreground'; 282 + }) 283 + ''; 284 + } 285 + { 286 + plugin = alpha-nvim; 287 + type = "lua"; 288 + config = builtins.readFile ./cfg/alpha.lua; 339 289 } 340 290 ]; 341 291 };