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

[Bug] Wrong completion items for the newline char in the schema context. #1440

Closed
Peefy opened this issue Jun 25, 2024 · 1 comment · Fixed by #1471
Closed

[Bug] Wrong completion items for the newline char in the schema context. #1440

Peefy opened this issue Jun 25, 2024 · 1 comment · Fixed by #1471
Assignees
Labels
bug Something isn't working lsp

Comments

@Peefy
Copy link
Contributor

Peefy commented Jun 25, 2024

Enhancement

Case 1

schema Deployment:
    name: str
    volumes?: [Volume]
    image: str
    replica: int = 1
    command: [str]
    labels?: {str:str}

schema Volume:
    name: str
    mountPath: str
    hostPath: str

nginx = Deployment {
    name = "my-nginx"
    image = "nginx:1.14.2"
    volumes = [Volume {
        name = "mydir"
        mountPath = "/test-pd"
        hostPath = "/data"
        # enter newline here.
    }]
    command = ["nginx"]
    labels.run = "my-nginx"
    labels.env = "pre-prod"
}

image

Case 2

import k8s.api.apps.v1 as appsv1
import k8s.api.core.v1 as corev1

statefulSet = appsv1.StatefulSet {
    spec: appsv1.StatefulSetSpec{
        serviceName: "foo"
        template: corev1.PodTemplateSpec{}
        selector: {# Enter newline here}
    }
}

image

Expected items are ["matchExpressions", "matchLabels"]

Case 3

import k8s.api.apps.v1 as appsv1
import k8s.api.core.v1 as corev1

statefulSet = appsv1.StatefulSet {
    spec: appsv1.StatefulSetSpec{
        serviceName: "foo"
        template: corev1.PodTemplateSpec{}
        selector: {
            # Enter newline here
        }
    }
}

image

Expected items are ["matchExpressions", "matchLabels"]

@Peefy Peefy added the lsp label Jun 25, 2024
@Peefy Peefy added this to the v0.9.0 Release milestone Jun 25, 2024
@He1pa He1pa closed this as completed Jun 26, 2024
@Peefy Peefy added the bug Something isn't working label Jul 1, 2024
@Peefy Peefy reopened this Jul 1, 2024
@Peefy Peefy reopened this Jul 4, 2024
@He1pa
Copy link
Contributor

He1pa commented Jul 5, 2024

close by #1476

@He1pa He1pa closed this as completed Jul 5, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants