Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenient packaging solution for existing Tact and FunC language servers #352

Open
novusnota opened this issue Oct 31, 2023 · 18 comments
Open
Assignees
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers

Comments

@novusnota
Copy link
Contributor

novusnota commented Oct 31, 2023

Summary

Convenient packaging solution for existing Tact and FunC language servers (of LSP specification), which are currently tightly integrated into their respective VSCode extensions: Tact, FunC.

The end-result should be available for use in any editor or IDE with language server client available, such as: Neovim, Emacs, Helix, Zed, etc.. Simple-to-use documentation on installation and usage of the re-packaged language servers has to be provided as well.

Context

The Language Server protocol (LSP) is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, go to definition, find all references and alike into the tool.

Existing official VSCode extensions for Tact and FunC language have implemented language servers according to the LSP, which currently are only used from within the VSCode contexts. However, its absolutely possible to extract and re-package them as a Node.js script bundles, which then can be distributed using NPM Registry and easily accessible from any editors and IDEs with LSP client available. This would consolidate TON developers into using the upstream, official language server implementations and allow for streamlined bugfixes and improvements of the upstream extensions.

Deliverables:

  • Extracted and re-packaged Tact and FunC language servers for independent use (without the VSCode, but with Node.js installed)
  • Automated update pipeline through GitHub Actions to keep up with any changes in the upstream extensions
  • Simple documentation on installation and usage in the respective GitHub repository
  • Publicly available NPM package for convenient installs and updates

References

Estimate suggested reward

  • Standard TON Footstep NFT
  • $200 in TON equivalent for extraction and packaging of Tact LS
  • $200 in TON equivalent for extraction and packaging of FunC LS

Total: $400

@novusnota novusnota added the Developer Tool Related to tools or utilities used by developers label Oct 31, 2023
@novusnota
Copy link
Contributor Author

novusnota commented Oct 31, 2023

@anton-trunov @delovoyhomie Ready to get assigned, as my work on #302 will be completed in about one and a half weeks from now

@anton-trunov
Copy link

It would be great if the deliverables included refactoring of the https://github.com/tact-lang/tact-vscode to use the packaged solution.

As tact-vscode maintainers, what do you think @logvik and @pizza-777?

@novusnota
Copy link
Contributor Author

@anton-trunov Oh, that'll make it a very different proposal. The thing I was intended to do was similar in spirit to vscode-langservers-extracted and not to the rather big refactor of tact-vscode, which probably has to be done not by me, but by the respective maintainers of the extension: @logvik and @pizza-777.

@anton-trunov
Copy link

Hmm, I'd very much like the packaged solution and the one from tact-vscode stay in sync.

@novusnota
Copy link
Contributor Author

They will stay in sync in the sense that packaged solution would be automatically updated every time tact-vscode is, making the extension the main thing and this project its subsidiary :)

@anton-trunov
Copy link

That sounds good to me, thanks. Let's wait for the input from the VS Code plugin team, though.

@novusnota
Copy link
Contributor Author

@delovoyhomie Submitted a Questbook proposal for this task. Submission deadline is set to 12th of November, 2023. Will deliver results right after completion of #302.

@liketurbo
Copy link
Contributor

Will I be able to use a repackaged version with nvim-lspconfig?

@novusnota
Copy link
Contributor Author

Yes, I'll send them a PR :)

@anton-trunov
Copy link

Hi @novusnota, any updates here?

@anton-trunov
Copy link

Hey @novusnota, sorry for pinging you one more time about the LSP packaging for Neovim, Emacs, Helix, etc. We are going to have a new Tact contest in about a month now, so it would be really cool to provide it to our contestants

@novusnota
Copy link
Contributor Author

@anton-trunov No worries, thanks for pinging. I'll post an update here this or next week and finish the task.

@novusnota
Copy link
Contributor Author

novusnota commented Feb 25, 2024

Almost there, wrapping up in 1-2 days (*when I find such time). FunC's LSP is being a bit rigid, but Tact one behaves much better, see screenshot below:

image

@novusnota
Copy link
Contributor Author

novusnota commented Apr 12, 2024

I finally found time enough to debug most issues with FunC's server, such that it's now working for Helix, Neovim, etc. (see Neovim on screenshot below) 🎉

image

Wrapping up starting tomorrow. Now for sure :)

@novusnota
Copy link
Contributor Author

novusnota commented Apr 16, 2024

Tact LS: ✔️ Packed

image

Install it via npm i -g tact-extracted-ls (or with other Node.js package managers), then setup in your editor using instructions in README:

Will pack FunC LS today, then start gradually sending PRs to:

  • nvim-lspconfig and Mason — for removing manual configuration in Neovim
  • vim-lsp-settings — for removing manual configuration in Vim
  • eglot & misc. — once Emacs mode releases, it's still in the works
  • Sublime Text's LSP package — once the package releases, definitely this week
  • Helix — once Tact v1.3.0 releases, to update all the queries of tree-sitter-tact there too.

@novusnota
Copy link
Contributor Author

FunC LS: ✔️ Packed

image

Install it via npm i -g func-extracted-ls (or with other Node.js package managers), then setup in your editor using instructions in README:

That concludes the bounty! Now, I'll proceed to send PRs to ease configuration as described in #352 (comment)

@anton-trunov
Copy link

Great job @novusnota! As always :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers
Projects
None yet
Development

No branches or pull requests

4 participants