kcl-lang / kcl

KCL Programming Language (CNCF Sandbox Project). https://kcl-lang.io
https://kcl-lang.io
Apache License 2.0
1.63k stars 115 forks source link

[Enhancement][Track] KCL VSCode IDE extension and lsp enhancement #524

Closed He1pa closed 7 months ago

He1pa commented 1 year ago

Enhancement

TODO List

image

image

image

schema Person:
    names: [str]

a = (Person{
    names = ["123"]
}.names)?[0]

feat:

lambda a: int {
    b = a # Go to definition feat for `a` in `b = a` is not work.
}

release: https://github.com/kcl-lang/kcl/issues/602

bugfix:

params = option("params") toMatch = params.toMatch toAdd = params.toAdd items = [item | {

If all annotations are matched, patch more annotations

if all key, value in toMatch { item.metadata.annotations[key] == value }: metadata.annotations: toAdd } for item in option("items")]

+ [x] #758

```python
a = "".capitalize() # The function has hover info
b = a.capitalize() # The function has not hover info

releated issues

image

image

image

image

schema Person:
    names: [str]

a = (Person{
    names = ["123"]
}.names)?[0]

image

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

deployment = appsv1.Deployment {
    metadata: config.metadata
    spec: appsv1.DeploymentSpec {
        if config.autoscaling.enabled:
            replicas = config.replicas
        strategy = {
            type =  "RollingUpdate"
            rollingUpdate.maxUnavailable = "50%"
        }
    }
}

image image

image image image

image

image

Peefy commented 1 year ago
amyXia1994 commented 1 year ago
amyXia1994 commented 1 year ago