mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	refactor: use builtin nvim function
This commit is contained in:
		
					parent
					
						
							
								fbf1cbc763
							
						
					
				
			
			
				commit
				
					
						641abe6b5c
					
				
			
		
					 1 changed files with 1 additions and 12 deletions
				
			
		|  | @ -266,7 +266,7 @@ in { | ||||||
| 
 | 
 | ||||||
|     toLuaBindings = mode: maps: |     toLuaBindings = mode: maps: | ||||||
|       builtins.map (value: '' |       builtins.map (value: '' | ||||||
|         map(${toLuaObject mode}, ${toLuaObject value.key}, ${ |         vim.keymap.set(${toLuaObject mode}, ${toLuaObject value.key}, ${ | ||||||
|           toLuaObject value.action |           toLuaObject value.action | ||||||
|         }, ${toLuaObject value.config})'') (genMaps mode maps); |         }, ${toLuaObject value.config})'') (genMaps mode maps); | ||||||
| 
 | 
 | ||||||
|  | @ -317,17 +317,6 @@ in { | ||||||
|         # This is probably not the right way to set the config. I'm not sure how it should look like. |         # This is probably not the right way to set the config. I'm not sure how it should look like. | ||||||
|         mappings = let |         mappings = let | ||||||
|           maps = [ |           maps = [ | ||||||
|             (splitString |  | ||||||
|               "\n" |  | ||||||
|               '' |  | ||||||
|                 local function map(mode, lhs, rhs, opts) |  | ||||||
|                   local options = { noremap=true, silent=true } |  | ||||||
|                   if opts then |  | ||||||
|                     options = vim.tbl_extend('force', options, opts) |  | ||||||
|                   end |  | ||||||
|                   vim.api.nvim_set_keymap(mode, lhs, rhs, options) |  | ||||||
|                 end |  | ||||||
|               '') |  | ||||||
|             nmap |             nmap | ||||||
|             imap |             imap | ||||||
|             vmap |             vmap | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 n3oney
				n3oney