mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 19:12:38 +00:00 
			
		
		
		
	feat: UI overhaul
This commit is contained in:
		
					parent
					
						
							
								202eaaf322
							
						
					
				
			
			
				commit
				
					
						5f861b3ed1
					
				
			
		
					 6 changed files with 113 additions and 2 deletions
				
			
		
							
								
								
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -41,6 +41,7 @@ | ||||||
|           viAlias = true; |           viAlias = true; | ||||||
|           vimAlias = true; |           vimAlias = true; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|         vim.lsp = { |         vim.lsp = { | ||||||
|           enable = true; |           enable = true; | ||||||
|           formatOnSave = true; |           formatOnSave = true; | ||||||
|  | @ -61,6 +62,7 @@ | ||||||
|             formatter = "alejandra"; |             formatter = "alejandra"; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|         vim.visuals = { |         vim.visuals = { | ||||||
|           enable = true; |           enable = true; | ||||||
|           nvimWebDevicons.enable = true; |           nvimWebDevicons.enable = true; | ||||||
|  | @ -79,20 +81,24 @@ | ||||||
|             lineTimeout = 0; |             lineTimeout = 0; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|         vim.statusline.lualine = { |         vim.statusline.lualine = { | ||||||
|           enable = true; |           enable = true; | ||||||
|           theme = "catppuccin"; |           theme = "catppuccin"; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|         vim.theme = { |         vim.theme = { | ||||||
|           enable = true; |           enable = true; | ||||||
|           name = "catppuccin"; |           name = "catppuccin"; | ||||||
|           style = "mocha"; |           style = "mocha"; | ||||||
|         }; |         }; | ||||||
|         vim.autopairs.enable = true; |         vim.autopairs.enable = true; | ||||||
|  | 
 | ||||||
|         vim.autocomplete = { |         vim.autocomplete = { | ||||||
|           enable = true; |           enable = true; | ||||||
|           type = "nvim-cmp"; |           type = "nvim-cmp"; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|         vim.filetree = { |         vim.filetree = { | ||||||
|           nvimTreeLua = { |           nvimTreeLua = { | ||||||
|             enable = true; |             enable = true; | ||||||
|  | @ -101,7 +107,10 @@ | ||||||
|             }; |             }; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
|         vim.tabline.nvimBufferline.enable = true; | 
 | ||||||
|  |         vim.tabline = { | ||||||
|  |           nvimBufferline.enable = true; | ||||||
|  |         }; | ||||||
| 
 | 
 | ||||||
|         vim.treesitter = { |         vim.treesitter = { | ||||||
|           enable = true; |           enable = true; | ||||||
|  | @ -155,6 +164,10 @@ | ||||||
|         vim.terminal = { |         vim.terminal = { | ||||||
|           toggleterm.enable = true; |           toggleterm.enable = true; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|  |         vim.ui = { | ||||||
|  |           noice.enable = true; | ||||||
|  |         }; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | @ -547,6 +560,12 @@ | ||||||
|       flake = false; |       flake = false; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     # UI44444 | ||||||
|  |     noice-nvim = { | ||||||
|  |       url = "github:folke/noice.nvim"; | ||||||
|  |       flake = false; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|     # Dependencies |     # Dependencies | ||||||
|     plenary-nvim = { |     plenary-nvim = { | ||||||
|       # (required by crates-nvim) |       # (required by crates-nvim) | ||||||
|  | @ -571,5 +590,11 @@ | ||||||
|       url = "github:godlygeek/tabular"; |       url = "github:godlygeek/tabular"; | ||||||
|       flake = false; |       flake = false; | ||||||
|     }; |     }; | ||||||
|  | 
 | ||||||
|  |     nui-nvim = { | ||||||
|  |       # (required by obsidian-nvim) | ||||||
|  |       url = "github:MunifTanjim/nui.nvim"; | ||||||
|  |       flake = false; | ||||||
|  |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -60,6 +60,8 @@ with lib; let | ||||||
|     "vim-markdown" |     "vim-markdown" | ||||||
|     "tabular" |     "tabular" | ||||||
|     "toggleterm-nvim" |     "toggleterm-nvim" | ||||||
|  |     "noice-nvim" | ||||||
|  |     "nui-nvim" | ||||||
|   ]; |   ]; | ||||||
|   # You can either use the name of the plugin or a package. |   # You can either use the name of the plugin or a package. | ||||||
|   pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); |   pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); | ||||||
|  |  | ||||||
|  | @ -28,6 +28,7 @@ | ||||||
|     ./presence |     ./presence | ||||||
|     ./notes |     ./notes | ||||||
|     ./terminal |     ./terminal | ||||||
|  |     ./ui | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   pkgsModule = {config, ...}: { |   pkgsModule = {config, ...}: { | ||||||
|  |  | ||||||
|  | @ -73,7 +73,18 @@ in { | ||||||
|           }, |           }, | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       telescope.load_extension('notify') | 
 | ||||||
|  |       ${ | ||||||
|  |         if config.vim.ui.noice.enable | ||||||
|  |         then "telescope.load_extension('noice')" | ||||||
|  |         else null | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       ${ | ||||||
|  |         if config.vim.notify.nvim-notify.enable | ||||||
|  |         then "telescope.load_extension('notify')" | ||||||
|  |         else null | ||||||
|  |       } | ||||||
|     ''; |     ''; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								modules/ui/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								modules/ui/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | _: { | ||||||
|  |   imports = [ | ||||||
|  |     ./noice.nix | ||||||
|  |   ]; | ||||||
|  | } | ||||||
							
								
								
									
										67
									
								
								modules/ui/noice.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								modules/ui/noice.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,67 @@ | ||||||
|  | { | ||||||
|  |   pkgs, | ||||||
|  |   config, | ||||||
|  |   lib, | ||||||
|  |   ... | ||||||
|  | }: | ||||||
|  | with lib; | ||||||
|  | with builtins; let | ||||||
|  |   cfg = config.vim.ui.noice; | ||||||
|  | in { | ||||||
|  |   options.vim.ui.noice = { | ||||||
|  |     enable = mkEnableOption "noice-nvim"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   config = mkIf cfg.enable { | ||||||
|  |     vim.startPlugins = [ | ||||||
|  |       "noice-nvim" | ||||||
|  |       "nui-nvim" | ||||||
|  |     ]; | ||||||
|  | 
 | ||||||
|  |     vim.luaConfigRC.noice-nvim = nvim.dag.entryAnywhere '' | ||||||
|  |       require("noice").setup({ | ||||||
|  |         lsp = { | ||||||
|  |           override = { | ||||||
|  |             ["vim.lsp.util.convert_input_to_markdown_lines"] = true, | ||||||
|  |             ["vim.lsp.util.stylize_markdown"] = true, | ||||||
|  |             ["cmp.entry.get_documentation"] = true, | ||||||
|  |           }, | ||||||
|  | 
 | ||||||
|  |           signature = { | ||||||
|  |             enabled = false, -- FIXME: enabling this file throws an error which I couldn't figure out | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  | 
 | ||||||
|  |         presets = { | ||||||
|  |           bottom_search = true, -- use a classic bottom cmdline for search | ||||||
|  |           command_palette = true, -- position the cmdline and popupmenu together | ||||||
|  |           long_message_to_split = true, -- long messages will be sent to a split | ||||||
|  |           inc_rename = false, -- enables an input dialog for inc-rename.nvim | ||||||
|  |           lsp_doc_border = false, -- add a border to hover docs and signature help | ||||||
|  |         }, | ||||||
|  | 
 | ||||||
|  |         format = { | ||||||
|  |           cmdline = { pattern = "^:", icon = "", lang = "vim" }, | ||||||
|  |           search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" }, | ||||||
|  |           search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" }, | ||||||
|  |           filter = { pattern = "^:%s*!", icon = "", lang = "bash" }, | ||||||
|  |           lua = { pattern = "^:%s*lua%s+", icon = "", lang = "lua" }, | ||||||
|  |           help = { pattern = "^:%s*he?l?p?%s+", icon = "" }, | ||||||
|  |           input = {}, | ||||||
|  |         }, | ||||||
|  | 
 | ||||||
|  |         -- Hide written messages | ||||||
|  |         routes = { | ||||||
|  |           { | ||||||
|  |             filter = { | ||||||
|  |               event = "msg_show", | ||||||
|  |               kind = "", | ||||||
|  |               find = "written", | ||||||
|  |             }, | ||||||
|  |             opts = { skip = true }, | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |       }) | ||||||
|  |     ''; | ||||||
|  |   }; | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 NotAShelf
				NotAShelf