mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	Merge branch 'main' into otter-update
This commit is contained in:
		
				commit
				
					
						f1ac8512de
					
				
			
		
					 11 changed files with 26 additions and 16 deletions
				
			
		|  | @ -463,3 +463,6 @@ | |||
|   leverage the pattern introduced in commit [fc8206e7a61d ("flake: utilize | ||||
|   nix-systems for overridable flake systems")]( | ||||
|   https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). | ||||
| 
 | ||||
| [soliprem](https://github.com/soliprem): | ||||
| - fix broken `neorg` grammars | ||||
|  |  | |||
|  | @ -15,8 +15,7 @@ | |||
|     pname = "avante-nvim-lib"; | ||||
|     inherit version src; | ||||
| 
 | ||||
|     useFetchCargoVendor = true; | ||||
|     cargoHash = "sha256-pmnMoNdaIR0i+4kwW3cf01vDQo39QakTCEG9AXA86ck="; | ||||
|     cargoHash = "sha256-8mBpzndz34RrmhJYezd4hLrJyhVL4S4IHK3plaue1k8="; | ||||
| 
 | ||||
|     nativeBuildInputs = [ | ||||
|       pkg-config | ||||
|  |  | |||
|  | @ -88,7 +88,7 @@ | |||
| in { | ||||
|   options.vim = { | ||||
|     diagnostics = { | ||||
|       enable = mkEnableOption "diagostics module for Neovim"; | ||||
|       enable = mkEnableOption "diagnostics module for Neovim"; | ||||
|       config = mkOption { | ||||
|         type = diagnosticsSubmodule; | ||||
|         default = {}; | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ in { | |||
| 
 | ||||
|     (mkIf cfg.treesitter.enable { | ||||
|       vim.treesitter.enable = true; | ||||
|       vim.treesitter.grammars = [cfg.treesitter.norgPackage]; | ||||
|       vim.treesitter.grammars = [cfg.treesitter.norgPackage cfg.treesitter.norgMetaPackage]; | ||||
|     }) | ||||
|   ]); | ||||
| } | ||||
|  |  | |||
|  | @ -4,9 +4,9 @@ | |||
|   pkgs, | ||||
|   ... | ||||
| }: let | ||||
|   inherit (lib.options) mkEnableOption mkOption; | ||||
|   inherit (lib.options) mkPackageOption mkEnableOption mkOption; | ||||
|   inherit (lib.types) submodule listOf str; | ||||
|   inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; | ||||
|   inherit (lib.nvim.types) mkPluginSetupOption; | ||||
| in { | ||||
|   options.vim.notes.neorg = { | ||||
|     enable = mkEnableOption '' | ||||
|  | @ -44,7 +44,12 @@ in { | |||
| 
 | ||||
|     treesitter = { | ||||
|       enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;}; | ||||
|       norgPackage = mkGrammarOption pkgs "norg"; | ||||
|       norgPackage = mkPackageOption pkgs ["norg-meta treesitter"] { | ||||
|         default = ["tree-sitter-grammars" "tree-sitter-norg"]; | ||||
|       }; | ||||
|       norgMetaPackage = mkPackageOption pkgs ["norg-meta treesitter"] { | ||||
|         default = ["tree-sitter-grammars" "tree-sitter-norg-meta"]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -65,6 +65,9 @@ in { | |||
|         ${optionalString ( | ||||
|           cfg.customSnippets.snipmate != {} | ||||
|         ) "require('luasnip.loaders.from_snipmate').lazy_load()"} | ||||
|         ${optionalString ( | ||||
|           config.vim.autocomplete.nvim-cmp.enable || config.vim.autocomplete.blink-cmp.friendly-snippets.enable | ||||
|         ) "require('luasnip.loaders.from_vscode').lazy_load()"} | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
|  |  | |||
|  | @ -246,10 +246,10 @@ in { | |||
|         transparent = { | ||||
|           enabled = ${boolToString transparent}, | ||||
|         }, | ||||
|         ${optionalString (!isNull palette) ''palette = "${palette}",''} | ||||
|         ${optionalString (!isNull variant) ''variant = "${variant}",''} | ||||
|         ${optionalString (palette != null) ''palette = "${palette}",''} | ||||
|         ${optionalString (variant != null) ''variant = "${variant}",''} | ||||
|       } | ||||
|       ${optionalString (!isNull background) ''vim.opt.background = "${background}"''} | ||||
|       ${optionalString (background != null) ''vim.opt.background = "${background}"''} | ||||
|       vim.cmd.colorscheme "solarized" | ||||
|     ''; | ||||
|     styles = let | ||||
|  |  | |||
|  | @ -106,7 +106,7 @@ in { | |||
|           -- Disable slow treesitter highlight for large files | ||||
|           function(lang, buf) | ||||
|             local max_filesize = 1000 * 1024 -- 1MB | ||||
|             local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) | ||||
|             local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf)) | ||||
|             if ok and stats and stats.size > max_filesize then | ||||
|                 return true | ||||
|             end | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
|   inherit (lib.nvim.dag) entryAnywhere; | ||||
| 
 | ||||
|   cfg = config.vim.binds.whichKey; | ||||
|   register = mapAttrsToList (n: v: lib.lists.optional (! isNull v) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register; | ||||
|   register = mapAttrsToList (n: v: lib.lists.optional (v != null) (mkLuaInline "{ '${n}', desc = '${v}' }")) cfg.register; | ||||
| in { | ||||
|   config = mkIf cfg.enable { | ||||
|     vim = { | ||||
|  |  | |||
|  | @ -39,7 +39,7 @@ in { | |||
|           type = luaInline; | ||||
|           default = mkLuaInline '' | ||||
|             function() | ||||
|               return vim.loop.cwd() | ||||
|               return vim.uv.cwd() | ||||
|             end | ||||
|           ''; | ||||
|           description = '' | ||||
|  |  | |||
|  | @ -35,9 +35,9 @@ | |||
|       }, | ||||
|       "branch": "main", | ||||
|       "submodules": false, | ||||
|       "revision": "2dd4c040880b271861369b361489a2d418d42648", | ||||
|       "url": "https://github.com/yetone/avante.nvim/archive/2dd4c040880b271861369b361489a2d418d42648.tar.gz", | ||||
|       "hash": "01j92m0qhd5g6m92rp0qnr4vqqgfrhbx91jbrrcjj1npizynxjm1" | ||||
|       "revision": "154e5f578f8925135a9dd23764d4c33a10c7ae36", | ||||
|       "url": "https://github.com/yetone/avante.nvim/archive/154e5f578f8925135a9dd23764d4c33a10c7ae36.tar.gz", | ||||
|       "hash": "0hx5ccfkn7ljnprzl6qwvb9ba86zrkqysh18zvnaq360g95d4ca1" | ||||
|     }, | ||||
|     "base16": { | ||||
|       "type": "Git", | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
					GitHub