mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	feat(treesitter): handle quantified fold captures
This commit is contained in:
		 Riley Bruins
					Riley Bruins
				
			
				
					committed by
					
						 Christian Clason
						Christian Clason
					
				
			
			
				
	
			
			
			 Christian Clason
						Christian Clason
					
				
			
						parent
						
							8886b1807c
						
					
				
				
					commit
					5e6240ffc2
				
			| @@ -404,6 +404,28 @@ t3]]) | ||||
|     }, get_fold_levels()) | ||||
|   end) | ||||
|  | ||||
|   it('handles quantified patterns', function() | ||||
|     insert([[ | ||||
| import hello | ||||
| import hello | ||||
| import hello | ||||
| import hello | ||||
| import hello | ||||
| import hello]]) | ||||
|  | ||||
|     exec_lua([[vim.treesitter.query.set('python', 'folds', '(import_statement)+ @fold')]]) | ||||
|     parse('python') | ||||
|  | ||||
|     eq({ | ||||
|       [1] = '>1', | ||||
|       [2] = '1', | ||||
|       [3] = '1', | ||||
|       [4] = '1', | ||||
|       [5] = '1', | ||||
|       [6] = '1', | ||||
|     }, get_fold_levels()) | ||||
|   end) | ||||
|  | ||||
|   it('updates folds in all windows', function() | ||||
|     local screen = Screen.new(60, 48) | ||||
|     screen:attach() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user