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

Add instructions for helm-ls to docs #2589

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

FichteFoll
Copy link

No description provided.

Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for sublime-lsp ready!

Name Link
🔨 Latest commit f08f2a7
🔍 Latest deploy log https://app.netlify.com/sites/sublime-lsp/deploys/67a0d5e974537000089351b0
😎 Deploy Preview https://deploy-preview-2589--sublime-lsp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

docs/src/language_servers.md Show resolved Hide resolved
## Helm

1. Install [helm-ls](https://github.com/mrjosh/helm-ls).
2. (Optional & recommended) Install [yaml-language-server](https://github.com/redhat-developer/yaml-language-server).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest removing step 2, and instead add a text that helm-ls could be used together with LSP-yaml (and add a link to LSP-yaml)

Copy link
Author

@FichteFoll FichteFoll Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using both language servers from ST is a subpar experience because the helm LS cannot manage the YAML-specific parts on its own and the YAML LS chokes on Helm templates.

It is a far better experience to have the helm LS also run the YAML LS in the background, which requires it to be installed and available on the PATH. There is probably a configuration option for the helm LS to specify a concrete path as well.

I should probably also add a note that using LSP-yaml in parallel is not recommended.

Copy link
Author

@FichteFoll FichteFoll Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also using the YAML (Go) syntax (added in 4181) with helm files, of course, but they use the .yml extension, which is why I need to use a plugin to assign the correct syntax to template files following a specific path schema. I should probably tweak the selector.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using both language servers from ST is a subpar experience because the helm LS cannot manage the YAML-specific parts on its own and the YAML LS chokes on Helm templates.
It is a far better experience to have the helm LS also run the YAML LS in the background, which requires it to be installed and available on the PATH. There is probably a configuration option for the helm LS to specify a concrete path as well.
I should probably also add a note that using LSP-yaml in parallel is not recommended.

That functionality isn't immediately obvious, until I have read what you wrote I had no idea.
So yes, it would make sense to mention that in the docs.

},
},
}
```

Note that the YAML language server on its own does not function properly for Helm files
and should thus be disabled –
ideally by adjusting its selector to `source.yaml - source.yaml.go`.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change in my local settings already, but imo it makes sense to upstream it as the default. What do you say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants