I've thought about LSP on and off for a while now, and I think without getting access to the proceeds of the parsing process, it will be difficult to get some of the bigger features.
I think DAP is the way to go right now: it's straightforward, easy to build in Pike, and the hope that additional tools will build support makes a lot of sense to me. I do most of my non-Pike and non-Pike-C development using JetBrains' tools and I'm hopeful that DAP is on the way there.
So, amongst all of this, I've had a thought that makes me die a little inside, but one that could be an opportunity:
I wrote a Pike language plugin for Eclipse some time ago, and part of that involved a fairly accurate language parser. It allowed code navigation and folding and all sorts of basic syntax chacking. I also built a primitive "Language server" in Pike that provided more detailed syntax checking and such. The Java code's biggest problems (aside from being written in Java) were that it supported the current version of pike at the time, and that it was blissfully ignorant of the precompiler.
Would it make sense, as a first proof of concept step, to use the java based parser in combination with the Java module to kick-start an LSP implementation (and possibly help with some of the debugger related niceties? Obviously this has major limitations and is not ideal, but it would allow there to be a tangible result more quickly, and leave a desire to purify the code later on rather than having to wait.
As a side note, I've got a JSON-RPC implementation that I thought would be helpful, but I don't think either protocol is actually JSON-RPC. I can still dump it somewhere in case anyone wants it. Not sure if that's something that should sit next to XMLRPC or not.
Any thoughts?
Bill December 7, 2018 1:30 PM, "Pontus Östlund" <pontus@roxen.com (mailto:%22Pontus%20%C3%96stlund%22%20pontus@roxen.com)> wrote: I can’t give any input on the debugger, but since I, for the past six months or so, primarily have been doing Typescript in VSCode, I must say it’s quite a challenge the days I have to go back to doing some Pike hacking (not because of the language itself, I love Pike, but from a tooling/developing perspective).
I’ve actually looked into LSP a bit and have had thoughts about implementing an LSP server for Pike (even the most simple stuff would help, you wouldn’t necessarily have to implement the whole shebang). But since Pike pretty much has zero introspection capabilities as of now, what you mentioned about the syntax tree is very interesting from a LSP perspective I think.
(And if using DAP would mean we’d also get an integrated debugger in VSCode, well then that would be awesome.)
Cheers # Pontus Skickat i rörligt läge 7 dec. 2018 kl. 16:22 skrev H. William Welliver III <william@welliver.org (mailto:william@welliver.org)>: I had been wondering if there was a debugging equivilant to LSP… that might be worth looking into. I wonder if many clients beside microsoft’s have developed support for it? I know LSP has pretty broad support. On Dec 7, 2018, at 6:08 AM, Tomasz Jamroszczak <tjamroszczak@opera.com (mailto:tjamroszczak@opera.com)> wrote: GDB or https://microsoft.github.io/debug-adapter-protocol/ (https://microsoft.github.io/debug-adapter-protocol/) Best Regards, Tomasz Jamroszczak