Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP Auto-complete Issues #20

Open
ghostbutter-games opened this issue Feb 13, 2024 · 3 comments
Open

LSP Auto-complete Issues #20

ghostbutter-games opened this issue Feb 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ghostbutter-games
Copy link

ghostbutter-games commented Feb 13, 2024

Hi,
first of all a big thank you for building this, I very much appreciate the effort and usability that's already there!

I am running into a couple of issues when using VSCode and the LSP with regards to Auto-complete:

Structs

  1. Having a struct instance that’s initialized via the literal syntax .{} breaks the auto-completion.
    Reproduction:
My_Struct :: struct {
    my_value : int;
}
my_struct : My_Struct = .{my_value = 5}; // This breaks auto-complete

my_struct : My_Struct; // For comparison, this works with auto-complete
my_struct.my_value = 5;
  1. Having a struct with using or #as using breaks the auto-completion.
    Reproduction:
My_Struct :: struct {
    using other : My_Other_Struct;
    my_value : int;
}

My_Other_Struct :: struct {
    other_value : string;
}
my_struct : My_Struct; 
my_struct.my_value = 5; // This works with auto_complete
my_struct.other_value = "test"; // This does not work with auto-complete for other_value

#import auto-complete

EDIT: It seems like the newest Jai version (0.1.086) fixed the auto-complete of the module I was using again, thankfully.
However, I have one quality of life issue:

When importing my Raylib module via rl :: #import "raylib";
and then using rl., the auto-completion list includes everything, including other module's namespaces, like e.g. the Basic module, etc.

It would be great if this could be fixed somehow, as rl.log does not make any sense / does not exist, but is still suggested as a valid auto-completion.

@wijiler
Copy link

wijiler commented Feb 13, 2024

I can confirm I have had these problems too.

@SogoCZE SogoCZE added the enhancement New feature or request label Feb 14, 2024
@valignatev
Copy link

valignatev commented Jul 26, 2024

Instead of creating another autocomplete feature request, I'll just add it here:

Stuff from preload is always in the global scope. But I have to explicitly import it with #import "Preload" to get the autocompletion for things like Type_Info_Struct and friends. And explicitly importing Preload is quite discouraged by the compiler!

@SogoCZE
Copy link
Owner

SogoCZE commented Jul 26, 2024

Instead of creating another autocomplete feature request, I'll just add it here:

Stuff from preload is always in the global scope. But I have to explicitly import it with #import "Preload" to get the autocompletion for things like Type_Info_Struct and friends. And explicitly importing Preload is quite discouraged by the compiler!

Jails currenty does not include Preload or Runtime_Support by default in its analyzer. I´ve already start to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants