Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

unable to setup "yaml-language-server" configuration on helix #5700

Closed
ghost opened this issue Jan 27, 2023 · 2 comments
Closed

unable to setup "yaml-language-server" configuration on helix #5700

ghost opened this issue Jan 27, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 27, 2023

I'd like to Enable Kubernetes on YAML via yaml-language-server.

However It's tricky (for me that I'm new to TOML Languages 😢 ) to add configuration on languages.toml, how can I add json configuration to enable this feature?

for example

yaml.schemas: {
    "kubernetes": ["*.yaml"]
}

Thanks.

@David-Else
Copy link
Contributor

David-Else commented Jan 27, 2023

I would also love to know the answer to this, I have tried the following to add formatting and it does not work:

[[language]]
name = "yaml"

# [language.config]
# yaml = { format.enable = true }

# OR

# config = { yaml.format.enable = true} 

There are many settings: https://github.com/redhat-developer/yaml-language-server#language-server-settings

@ghost
Copy link
Author

ghost commented Jan 27, 2023

2023-01-27-233659_screenshot

Ah! I've found a solution from "nvim-lspconfig" Repository's Issue!

Here is my configuration to Enable Kubernetes from YAML.

[[language]]
name = "yaml"
file-types = ["yaml", "yml"]
config = { yaml = { schemas = { kubernetes = "/*.yaml" }, format = { enable = true } } }

But, when I type :format command on helix. It doesn't formatted. and on log (a.k.a .cache/helix/helix.log), helix got a malformed notification from LSP Server.

2023-01-27T23:48:26.086 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2023-01-27T23:48:26.086 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled

Anyway, It worked!

@helix-editor helix-editor locked and limited conversation to collaborators Jan 27, 2023
@the-mikedavis the-mikedavis converted this issue into discussion #5704 Jan 27, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant