godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.75k stars 20.12k forks source link

3.5 LSP does not offer completions for signals or actions #65001

Open rcorre opened 2 years ago

rcorre commented 2 years ago

Godot version

3.5.stable.arch_linux

System information

Linux 5.19.4-arch1-1

Issue description

Given the following script:

extends Spatial

func _ready():
    get_tree().create_timer(1.0).connect("ti<cursor_here>

In 3.4, the LSP will offer "timeout" as a completion. In 3.5, the LSP will not offer any completions.

This sounds similar to https://github.com/godotengine/godot/issues/64666, but in this case, instead of offering a completion that inserts empty text, the LSP is not offering a completion at all.

I'm using neovim's 0.7.2's builtin lsp client. 34.txt 35.txt

Steps to reproduce

  1. Open the example project
  2. Open Spatial.gd in neovim
  3. Request a completion after "ti
  4. Note no completion is offered
  5. Repeat in godot 3.4
  6. Note a completion is offered

Minimal reproduction project

example.zip

rcorre commented 2 years ago

I tested with 4.0.alpha.custom_build.97c0dd74d. That offers way too many completions. 40.txt

KoBeWi commented 2 years ago

Try with connect(ti<cursor_here>

rcorre commented 2 years ago

No luck -- without quotes, I get

Time                              Class                                                
Timer                             Class                                                
TileMap                           Class                                                
TileSet                           Class                                                
TreeItem                          Class                                                
TYPE_INT                          Class                                                
TYPE_INT_ARRAY                    Class                                                
to_string                         Method                                               
type_exists                       Method                                               
translation                       Property                                             
get_global_transform_interpolated Method                                               
get_process_delta_time            Method                                               
AnimationNodeTimeSeek             Class                                                
AnimationNodeTimeScale            Class                                                
get_physics_process_delta_time    Method                                               
TYPE_NIL                          Class                                                
TYPE_RID                          Class                                                
TextEdit                          Class                                                
TextFile                          Class           
TYPE_BASIS                        Class           
TYPE_STRING                       Class           
Translation                       Class           
TabContainer                      Class           
TriangleMesh                      Class           
TYPE_DICTIONARY                   Class           
TYPE_STRING_ARRAY                 Class           
TranslationServer                 Class           
ERR_TIMEOUT                       Class           
MIDI_MESSAGE_TIMING_CLOCK         Class           
...
rcorre commented 2 years ago

It also seems that action completion (i.e. for event.is_action("ui_<completion>) works in 3.4, but not 3.5.

34.txt 35.txt