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] Problem with inherited schema attr completion #1752

Open
He1pa opened this issue Nov 14, 2024 · 0 comments
Open

[lsp] Problem with inherited schema attr completion #1752

He1pa opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working lsp resolver

Comments

@He1pa
Copy link
Contributor

He1pa commented Nov 14, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

schema BaseConfig:
    name: str

schema Config(BaseConfig):
    count: int

schema Name:
    config: Config

n = Name{
    config: {
        name = ""
        <cursor>  # cannot complete  for `count`
    }
}

But the following two situations are work

schema BaseConfig:
    name: str

schema Config(BaseConfig):
    count: int

schema Name:
    config: Config

n = Name{
    config: Config {   # specify the schema name
        name = ""
        <cursor> 
    }
}

and

schema BaseConfig:
    name: str

schema Config(BaseConfig):
    count: int

schema Name:
    config: Config

n = Name{
    config: {  
        count = ""  
        <cursor>  #  `count` is attr of Config, `name` is inherited from BaseConfig, lsp can still complete the `name` here
    }
}

2. What did you expect to see? (Required)

The lsp works fine.

3. What did you see instead (Required)

4. What is your KCL components version? (Required)

Version: 0.10.9-c020ab3eb4b9179219d6837a57f5d323
Platform: aarch64-apple-darwin
GitCommit: 257c0bf5051065358bec1f5703ab75452887ee64
@Peefy Peefy added this to the v0.11.0 Release milestone Nov 14, 2024
@Peefy Peefy added bug Something isn't working lsp resolver labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp resolver
Projects
None yet
Development

No branches or pull requests

2 participants