redhat-developer / redhat-developer/yaml-language-server
Is there a way to stop yamlls from single-line formatting my multi-line entries?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
Summary
I have the following in a yaml file.
envArgs:
JAVA_OPTS: -Dconfig.resource=streaming-$(ENVIRONMENT).conf
-Xmx2048m
-Xms2048m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-XX:+ExitOnOutOfMemoryError
-Dcom.twitter.finagle.netty3.numWorkers=20
-Dcom.twitter.finagle.netty4.numWorkers=20
-Dzipkin.http.host=$(NODE_IP):9411
-Dtalon.stats.enabled=true
In Neovim when I save the file it single lines all those JAVA_OPTS. Example:
envArgs:
JAVA_OPTS: -Dconfig.resource=streaming-$(CK_ENVIRONMENT).conf -Xmx1024m -Xms400m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+ExitOnOutOfMemoryError -Dcom.twitter.finagle.netty3.numWorkers=20 -Dcom.twitter.finagle.netty4.numWorkers=20 -Dzipkin.http.host=$(NODE_IP):9411 -Dtalon.stats.enabled=true
I strongly dislike this. How can I disable this? I did not see any explanation in the README or Issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the save behavior in Neovim with the YAML language server and compare the multiline input with the single-line output. Read the README and existing Issues for formatting configuration guidance; done means saving preserves the requested multiline JAVA_OPTS layout or documents the available way to disable this formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100