redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.1k stars 264 forks source link

Is there a way to stop yamlls from single-line formatting my multi-line entries? #913

Open jsatk opened 1 year ago

jsatk commented 1 year ago

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.