mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 19:12:38 +00:00 
			
		
		
		
	Merge pull request #287 from FrothyMarrow/mappings-fix
plugins/lsp: filter out null mappings
This commit is contained in:
		
				commit
				
					
						12fd9d69dc
					
				
			
		
					 2 changed files with 6 additions and 2 deletions
				
			
		|  | @ -13,7 +13,8 @@ Release notes for release 0.7 | ||||||
| 
 | 
 | ||||||
| - Modified type for [](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) | - Modified type for [](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) | ||||||
|   from `anything` to a `submodule` for better type checking. |   from `anything` to a `submodule` for better type checking. | ||||||
|  | - Fix null `vim.lsp.mappings` generating an error and not being filtered out. | ||||||
| 
 | 
 | ||||||
| [horriblename](https://github.com/horriblename) | [horriblename](https://github.com/horriblename): | ||||||
| 
 | 
 | ||||||
| - Fix broken treesitter-context keybinds in visual mode | - Fix broken treesitter-context keybinds in visual mode | ||||||
|  |  | ||||||
|  | @ -16,7 +16,10 @@ | ||||||
| 
 | 
 | ||||||
|   mappingDefinitions = self.options.vim.lsp.mappings; |   mappingDefinitions = self.options.vim.lsp.mappings; | ||||||
|   mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; |   mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; | ||||||
|   mkBinding = binding: action: "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})"; |   mkBinding = binding: action: | ||||||
|  |     if binding.value != null | ||||||
|  |     then "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})" | ||||||
|  |     else ""; | ||||||
| in { | in { | ||||||
|   config = mkIf cfg.enable { |   config = mkIf cfg.enable { | ||||||
|     vim = { |     vim = { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
					GitHub