mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 12:05:57 +00:00 
			
		
		
		
	[ty] IDE: add support for object.<CURSOR> completions (#18468)
				
					
				
			This PR adds logic for detecting `Name Dot [Name]` token patterns, finding the corresponding `ExprAttribute`, getting the type of the object and returning the members available on that object. Here's a video demonstrating this working: https://github.com/user-attachments/assets/42ce78e8-5930-4211-a18a-fa2a0434d0eb Ref astral-sh/ty#86
This commit is contained in:
		
							parent
							
								
									c0bb83b882
								
							
						
					
					
						commit
						55100209c7
					
				
					 6 changed files with 437 additions and 24 deletions
				
			
		|  | @ -180,6 +180,7 @@ impl Server { | |||
|             completion_provider: experimental | ||||
|                 .is_some_and(Experimental::is_completions_enabled) | ||||
|                 .then_some(lsp_types::CompletionOptions { | ||||
|                     trigger_characters: Some(vec!['.'.to_string()]), | ||||
|                     ..Default::default() | ||||
|                 }), | ||||
|             ..Default::default() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Gallant
						Andrew Gallant