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

code completion does not work #25

Closed
certik opened this issue Dec 6, 2024 · 6 comments · Fixed by #37
Closed

code completion does not work #25

certik opened this issue Dec 6, 2024 · 6 comments · Fixed by #37
Labels
bug Something isn't working

Comments

@certik
Copy link
Contributor

certik commented Dec 6, 2024

This should show program1 as a possible completion:

image

@certik certik added the bug Something isn't working label Dec 6, 2024
@dylon
Copy link
Collaborator

dylon commented Dec 9, 2024

The definition preview is indexed the same way as described here: #24. I will leave this open for now, but once the latter is resolved so too will this one be resolved.

@certik
Copy link
Contributor Author

certik commented Dec 19, 2024

It seems to work now. I'll leave this open to test this more, but the basic code completion seems to work.

@certik
Copy link
Contributor Author

certik commented Dec 19, 2024

Here is one bug: the completion doesn't work inside derived types:

program derived_types_28
    implicit none
    type t
        real, dimension(:), pointer :: x, y, z
    end type t

    type(t) :: type
    real, target :: r(1)
    real :: ans
    r = 34
    type%x => r
    type%y => r
    type%z => r
    type%

    type%x = type%y + type%z

    ans = type%x(1)
    print *, ans

    if (abs(ans - 68.0) > 1e-5) error stop
end program

On the line type% it will not complete anything.

@Pranavchiku
Copy link
Member

With #37. All these are because we were not using --continue-compilation

image

@Pranavchiku
Copy link
Member

Pranavchiku commented Dec 19, 2024

image

This is still a bug. I'm opening separate issue for this. Opened at #38

@certik
Copy link
Contributor Author

certik commented Dec 23, 2024

The basic code completion now works:

image

But as you can see, it offers the symbol xx124 as well, but that's the name of the program, so we should know in ASR that a program symbol cannot be used inside print. That is a seperate issue to filter the symbols based on what fits in the current position. I opened up a new issue for this at #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants