AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

ada_langauge_server uses FormattingOptions tabSize as basic indent, not tab equivalent #1075

Closed stephe-ada-guru closed 1 year ago

stephe-ada-guru commented 1 year ago

This uses the same test as #1074; attached. test.json.txt

Changing the tabSize setting demonstrates that ada_langauge_server uses FormattingOptions tabSize as basic indent, not tab equivalent in spaces.

Searching the web for "lsp format tabsize indent" turns up many other people/servers with similar confusions, but also implies that the meaning of tabSize is totally up to the server (which seems to violate the purpose of a standard).

So as long as ada_language_server documents this, i guess it's ok. I can have Emacs ada-mode set tabSize to the desired basic indent.

It would also be nice to have much more control over the formatting; I'll open another issue on that.