mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	modules/neovim: deprecate vim.enableEditorconfig option
		
	Deprecate shorthand EditorConfig toggle, and encourage the more powerful `vim.globals` option.
This commit is contained in:
		
					parent
					
						
							
								73660af2e3
							
						
					
				
			
			
				commit
				
					
						0650aa31ac
					
				
			
		
					 4 changed files with 27 additions and 16 deletions
				
			
		|  | @ -28,11 +28,11 @@ configuration formats. | ||||||
| 
 | 
 | ||||||
| ### `vim.maps` rewrite {#sec-vim-maps-rewrite} | ### `vim.maps` rewrite {#sec-vim-maps-rewrite} | ||||||
| 
 | 
 | ||||||
| Instead of specifying map modes using submodules (eg.: `vim.maps.normal`), a new | Instead of specifying map modes using submodules (e.g.: `vim.maps.normal`), a | ||||||
| `vim.keymaps` submodule with support for a `mode` option has been introduced. It | new `vim.keymaps` submodule with support for a `mode` option has been | ||||||
| can be either a string, or a list of strings, where a string represents the | introduced. It can be either a string, or a list of strings, where a string | ||||||
| short-name of the map mode(s), that the mapping should be set for. See | represents the short-name of the map mode(s), that the mapping should be set | ||||||
| `:help map-modes` for more information. | for. See `:help map-modes` for more information. | ||||||
| 
 | 
 | ||||||
| For example: | For example: | ||||||
| 
 | 
 | ||||||
|  | @ -334,6 +334,9 @@ The changes are, in no particular order: | ||||||
|   `vim.options` as default values. Some are left as they don't have a direct |   `vim.options` as default values. Some are left as they don't have a direct | ||||||
|   equivalent, but expect a switch eventually. |   equivalent, but expect a switch eventually. | ||||||
| 
 | 
 | ||||||
|  | - Deprecated `vim.enableEditorconfig` in favor of | ||||||
|  |   [](#opt-vim.globals.editorconfig). | ||||||
|  | 
 | ||||||
| [ppenguin](https://github.com/ppenguin): | [ppenguin](https://github.com/ppenguin): | ||||||
| 
 | 
 | ||||||
| - Telescope: | - Telescope: | ||||||
|  |  | ||||||
|  | @ -84,9 +84,12 @@ in { | ||||||
|         `tabstop` and `shiftwidth` manually in `vim.options` or per-filetype in a |         `tabstop` and `shiftwidth` manually in `vim.options` or per-filetype in a | ||||||
|         `ftplugin` directory added to your runtime path. |         `ftplugin` directory added to your runtime path. | ||||||
|       '') |       '') | ||||||
|  | 
 | ||||||
|  |       # 2024-12-02 | ||||||
|  |       (mkRenamedOptionModule ["vim" "enableEditorconfig"] ["vim" "globals" "editorconfig"]) | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
|     # 2024-12-1 |     # 2024-12-01 | ||||||
|     # Migrated via batchRenameOptions. Further batch renames must be below this line. |     # Migrated via batchRenameOptions. Further batch renames must be below this line. | ||||||
|     renamedVimOpts |     renamedVimOpts | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|  | @ -70,12 +70,6 @@ in { | ||||||
|       description = "Set how bells are handled. Options: on, visual or none"; |       description = "Set how bells are handled. Options: on, visual or none"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     enableEditorconfig = mkOption { |  | ||||||
|       type = bool; |  | ||||||
|       default = true; |  | ||||||
|       description = "Follow editorconfig rules in current directory"; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     searchCase = mkOption { |     searchCase = mkOption { | ||||||
|       type = enum ["ignore" "smart" "sensitive"]; |       type = enum ["ignore" "smart" "sensitive"]; | ||||||
|       default = "sensitive"; |       default = "sensitive"; | ||||||
|  | @ -112,10 +106,6 @@ in { | ||||||
|       expandtab = true; |       expandtab = true; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     globals = pushDownDefault { |  | ||||||
|       editorconfig = cfg.enableEditorconfig; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     # Options that are more difficult to set through 'vim.options'. Fear not, though |     # Options that are more difficult to set through 'vim.options'. Fear not, though | ||||||
|     # as the Lua DAG is still as powerful as it could be. |     # as the Lua DAG is still as powerful as it could be. | ||||||
|     luaConfigRC.basic = entryAfter ["globalsScript"] '' |     luaConfigRC.basic = entryAfter ["globalsScript"] '' | ||||||
|  |  | ||||||
|  | @ -121,6 +121,21 @@ in { | ||||||
|             default = ","; |             default = ","; | ||||||
|             description = "The key used for `<localleader>` mappings"; |             description = "The key used for `<localleader>` mappings"; | ||||||
|           }; |           }; | ||||||
|  | 
 | ||||||
|  |           editorconfig = mkOption { | ||||||
|  |             type = bool; | ||||||
|  |             default = true; | ||||||
|  |             description = '' | ||||||
|  |               Whether to enable EditorConfig integration in Neovim. | ||||||
|  | 
 | ||||||
|  |               This defaults to true as it is enabled by default in stock | ||||||
|  |               Neovim, setting this option to false disables EditorConfig | ||||||
|  |               integration entirely. | ||||||
|  | 
 | ||||||
|  |               See [Neovim documentation](https://neovim.io/doc/user/editorconfig.html) | ||||||
|  |               for more details on configuring EditorConfig behaviour. | ||||||
|  |             ''; | ||||||
|  |           }; | ||||||
|         }; |         }; | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue