feat(home:git): add gh tool
This commit is contained in:
		
							parent
							
								
									33e7a6f7f9
								
							
						
					
					
						commit
						e743691d94
					
				
					 12 changed files with 225 additions and 47 deletions
				
			
		
							
								
								
									
										37
									
								
								home/modules/console/editor/nvim/colorscheme.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								home/modules/console/editor/nvim/colorscheme.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   inherit (config.colorscheme) slug palette; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim = { | ||||
|       colorschemes.base16 = { | ||||
|         enable = true; | ||||
|         colorscheme = "${slug}"; | ||||
|         # colorscheme = { | ||||
|         #   base00 = "#${palette.base00}"; | ||||
|         #   base01 = "#${palette.base01}"; | ||||
|         #   base02 = "#${palette.base02}"; | ||||
|         #   base03 = "#${palette.base03}"; | ||||
|         #   base04 = "#${palette.base04}"; | ||||
|         #   base05 = "#${palette.base05}"; | ||||
|         #   base06 = "#${palette.base06}"; | ||||
|         #   base07 = "#${palette.base07}"; | ||||
|         #   base08 = "#${palette.base08}"; | ||||
|         #   base09 = "#${palette.base09}"; | ||||
|         #   base0A = "#${palette.base0A}"; | ||||
|         #   base0B = "#${palette.base0B}"; | ||||
|         #   base0C = "#${palette.base0C}"; | ||||
|         #   base0D = "#${palette.base0D}"; | ||||
|         #   base0E = "#${palette.base0E}"; | ||||
|         #   base0F = "#${palette.base0F}"; | ||||
|         # }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -12,6 +12,7 @@ in | |||
|     ./settings.nix | ||||
|     ./keymapping.nix | ||||
|     ./plugins | ||||
|     ./colorscheme.nix | ||||
|   ]; | ||||
|    | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|  |  | |||
|  | @ -13,40 +13,13 @@ in | |||
|         mapleader = " "; | ||||
|         maplocalleader = " "; | ||||
|       }; | ||||
| 
 | ||||
|       keymaps = let | ||||
|         normal =  | ||||
|           mapAttrsToList | ||||
|           (key: action: { | ||||
|             mode = "n"; | ||||
|             inherit action key; | ||||
|           }) | ||||
|           { | ||||
|             "<Space>" = "<NOP>"; | ||||
|             "esc" = ":noh<CR>"; | ||||
|             "Y" = "$y"; | ||||
|           }; | ||||
|           visual = | ||||
|             mapAttrsToList | ||||
|             (key: action: { | ||||
|               mode = "v"; | ||||
|               inherit action key; | ||||
|             }) | ||||
|             { | ||||
|               # better indenting | ||||
|               ">" = ">gv"; | ||||
|               "<" = "<gv"; | ||||
|               "<TAB>" = ">gv"; | ||||
|               "<S-TAB>" = "<gv"; | ||||
| 
 | ||||
|               # move selected line / block of text in visual mode | ||||
|               "K" = ":m '<-2<CR>gv=gv"; | ||||
|               "J" = ":m '>+1<CR>gv=gv"; | ||||
|             }; | ||||
|       in | ||||
|       config.nixvim.helpers.keymaps.mkKeymaps | ||||
|       {options.silent = true;} | ||||
|       (normal ++ visual); | ||||
|       keymaps = [ | ||||
|         { | ||||
|           mode = "n"; | ||||
|           key = "<leader>f"; | ||||
|           action = "+find/file"; | ||||
|         } | ||||
|       ];  | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -3,5 +3,10 @@ | |||
|     ./indent.nix | ||||
|     ./telescope.nix | ||||
|     ./lualine.nix | ||||
|     ./lsp.nix | ||||
|     ./noice.nix | ||||
|     ./nvim-autopairs.nix | ||||
|     ./vim-nix.nix | ||||
|     ./treesitter.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										38
									
								
								home/modules/console/editor/nvim/plugins/lsp.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								home/modules/console/editor/nvim/plugins/lsp.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins = { | ||||
|       lsp-lines.enable = true; | ||||
|       lsp = { | ||||
|         enable = true; | ||||
|         capabilities = "offsetEncoding = 'utf-16'"; | ||||
|         servers = { | ||||
| 
 | ||||
|           # nix | ||||
|           nil-ls = { | ||||
|             enable = true; | ||||
|           }; | ||||
|           # markdown | ||||
|           marksman = { | ||||
|             enable = true; | ||||
|           }; | ||||
|           # css | ||||
|           cssls = { | ||||
|             enable = true; | ||||
|           }; | ||||
|           # c/c++ | ||||
|           clangd = { | ||||
|             enable = true; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -10,7 +10,6 @@ in | |||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins.lualine = { | ||||
|       enable = true; | ||||
|       theme = "base16"; | ||||
|       globalstatus = true; | ||||
|       sections = { | ||||
|         lualine_a = ["mode"]; | ||||
|  |  | |||
							
								
								
									
										19
									
								
								home/modules/console/editor/nvim/plugins/noice.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								home/modules/console/editor/nvim/plugins/noice.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins.noice = { | ||||
|       enable = true; | ||||
|       presets = { | ||||
|         bottom_search = true; | ||||
|         command_palette = true; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								home/modules/console/editor/nvim/plugins/nvim-autopairs.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								home/modules/console/editor/nvim/plugins/nvim-autopairs.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins.nvim-autopairs = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								home/modules/console/editor/nvim/plugins/treesitter.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								home/modules/console/editor/nvim/plugins/treesitter.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins.treesitter = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								home/modules/console/editor/nvim/plugins/vim-nix.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								home/modules/console/editor/nvim/plugins/vim-nix.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   cfg = config.ooknet.editor.nvim; | ||||
|   console = config.ooknet.console; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim.plugins.nix = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -9,32 +9,92 @@ in | |||
| { | ||||
|   config = mkIf (cfg.enable || console.editor == "nvim") { | ||||
|     programs.nixvim = { | ||||
|       options = { | ||||
|       opts = { | ||||
| 
 | ||||
|         # line numbers | ||||
|         relativenumber = true; | ||||
|         number = true; | ||||
| 
 | ||||
|         # command line height | ||||
|         cmdheight = 2; | ||||
| 
 | ||||
|         # popup menu height (0 == use all available space) | ||||
|         pumheight = 0; | ||||
|          | ||||
|         hidden = true; | ||||
| 
 | ||||
|         # mouse mode | ||||
|         mouse = "a"; | ||||
|         mousemodel = "extend"; | ||||
| 
 | ||||
|         # undo history | ||||
|         undofile = true; | ||||
|         swapfile = false; | ||||
|         incsearch = true; | ||||
|         ignorecase = true; | ||||
|         smartcase = true; | ||||
|         fileencoding = "utf-8"; | ||||
|         termguicolors = true; | ||||
|         autoindent = true; | ||||
|         shiftwidth = 2; | ||||
|         smartindent = true; | ||||
|         backup = false; | ||||
| 
 | ||||
|         # tab size | ||||
|         tabstop = 2; | ||||
|         expandtab = true; | ||||
|         updatetime = 100; | ||||
|         showtabline = 2; | ||||
|         softtabstop = 2; | ||||
| 
 | ||||
|         # auto indenting | ||||
|         smartindent = true; | ||||
|         shiftwidth = 2; | ||||
|          | ||||
|         # text wrapping | ||||
|         wrap = true; | ||||
| 
 | ||||
|         # fold settings | ||||
|         foldcolumn = "0"; | ||||
|         foldlevel = 99; | ||||
|         foldlevelstart = 99; | ||||
|         foldenable = true; | ||||
|          | ||||
|         # which-key timeout | ||||
|         timeoutlen = 10; | ||||
| 
 | ||||
|         # faster updatetime | ||||
|         updatetime = 50; | ||||
| 
 | ||||
|         # cursor position unless at start/end | ||||
|         scrolloff = 8; | ||||
| 
 | ||||
|         # 24 bit colors | ||||
|         termguicolors = true; | ||||
| 
 | ||||
|         # highlight cursor line | ||||
|         cursorline = true; | ||||
| 
 | ||||
|         # encoding | ||||
|         encoding = "utf-8"; | ||||
|         fileencoding = "utf-8"; | ||||
| 
 | ||||
|         # chars list | ||||
|         # list = true; | ||||
|         # listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣"; | ||||
|          | ||||
|         # splitting | ||||
|         splitbelow = true; | ||||
|         splitright = true; | ||||
|              | ||||
|         # better searching | ||||
|         ignorecase = true; | ||||
|         grepprg = "rg --vimgrep"; | ||||
|         grepformat = "%f:%l:%c:%m"; | ||||
|         smartcase = true; | ||||
|          | ||||
|         # prevent screen jumping | ||||
|         signcolumn = "yes"; | ||||
| 
 | ||||
|         incsearch = true; | ||||
|         autoindent = true; | ||||
|       }; | ||||
| 
 | ||||
|       clipboard = { | ||||
|         register = "unnamedplus"; | ||||
|         providers.wl-copy.enable = true; | ||||
|       }; | ||||
| 
 | ||||
|       colorscheme = "${config.colorscheme.slug}"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue