tact-lang / tact-vscode

Tact VS Code plugin
Apache License 2.0
22 stars 9 forks source link

`textDocument/formatting` is not supported #29

Closed novusnota closed 5 months ago

novusnota commented 9 months ago

Language server as per LSP documentation can support textDocument/formatting method, which is called in any LS clients (mainly in editors) whenever whole file formatting is needed.

At the moment, this plugin has formatting implemented as a VSCode-only feature and not a part of LSP specification, which results in failure to format Tact code when the language server of this plugin is used independently (i.e. here) — a message such as this is shown: "textDocument/formatting not supported for tact".

The solution would be to register formatting capabilities and handle the textDocument/formatting request.

Additionally, there are two similar methods specified in LSP, which may also be handled to further improve UX:

logvik commented 9 months ago

I assume that this part can be done within grants-and-bounties task. PR is welcome.

novusnota commented 9 months ago

@logvik Good suggestion, will do!

UPD: Tried to do it, with no avail yet.

logvik commented 5 months ago

Resolved at #38