Currently, when acme-lsp sends a Formatting command to the server, it implicitly provides the zero-value for FormattingOptions, amounting to a TabSize = 0 and InsertSpaces = false.
When using the YAPF plugin with python-lsp-server, these values override the configured behavior. In my case, I'd like to adhere to the PEP-8 standard, which would require TabSize = 4 and InsertSpaces = true.
Given all of that, I'd like to propose adding per-server support for FormattingOptions. The result would be something like:
[Servers]
[Servers.pylsp]
Command = ["pylsp", "-vvv"]
StderrFile = "pylsp.stderr.log"
LogFile = "pylsp.log"
# These settings get passed to pylsp
[Servers.pylsp.Options]
"pylsp.plugins.autopep8.enabled" = false
"pylsp.plugins.yapf.enabled" = true
# These settings get passed on Format
[Servers.pylsp.FormattingOptions]
TabSize = 4
InsertSpaces = true
If this seems reasonable, I'd be happy to open a PR to add this.
Currently, when
acme-lsp
sends aFormatting
command to the server, it implicitly provides the zero-value forFormattingOptions
, amounting to aTabSize = 0
andInsertSpaces = false
.When using the YAPF plugin with
python-lsp-server
, these values override the configured behavior. In my case, I'd like to adhere to the PEP-8 standard, which would requireTabSize = 4
andInsertSpaces = true
.Given all of that, I'd like to propose adding per-server support for
FormattingOptions
. The result would be something like:If this seems reasonable, I'd be happy to open a PR to add this.
Please let me know your thoughts.