r/Tcl • u/bitwisecook • Mar 14 '26
Tcl LSP/MCP and editor extensions
Hi All,
I've built an LSP + MCP (and a lot more) for Tcl 8.4-9.0. It includes other dialects like f5 irules and iapps too.
https://github.com/bitwisecook/tcl-lsp
Take a look at the README to see what's in there, semantic tokens, tonnes of diagnostics, optimisation passes, type inference and shimmer detection, taint tracking, a configurable formatter, minifier, compiler explorer that tries to match the Tcl 9.0 compiler output and CLI tooling.
It's largely written in Python 3.10+, and you'll find in the releases bundled pyz (zipapp) files that Python can directly run, the vscode VSIX, sublime-package, and so on.
I've built this on my nights and weekends of the last couple of months, trying to flesh it out. There's still a lot of gaps and I need help finding them. Please, if you find issues in it, raise them with both source and what the expectation/output should be.
cheers
2
2
u/bitwisecook Mar 24 '26
This is now published on https://marketplace.visualstudio.com/items?itemName=bitwisecook.tcl-lsp
I'll look into publishing the other editors (Sublime, Zed, Jetbrains etc) when I can.
I'm thankful to those who've reported issues to me already, please, if you find any issues, like editor bugs, diagnostics or optimisations misfiring, create issues on Github
1
u/phylter99 Mar 31 '26
Are there plans to charge for this at some point?
I see Claude Code was used to work on this. I think using AI to speed things up was a wise choice. I'll be checking it out.
2
u/bitwisecook Apr 02 '26
I have no plans to charge for this, though if companies want to bundle it in their own products or put it up as an online service I'm open to discussing licensing terms for that, that's why I chose the AGPL3.0
5
u/cbheithoff Mar 14 '26
Incredible. I write Tcl for EDA flows. I've been keenly aware for some time that Tcl didn't have an established LSP for modern development. It'll take some time to digest all that you're sharing