Re:Ask HN: What's the best source code you've read?
by junon on Sunday September 11, 2022 @03:19AM
(#32797522)
Speaking anecdotally, I have nothing but issues with LSP. It's a pain to use, a pain to configure, gives sub-par results and is usually wraps with extra "features" that change how code gets edited between different languages (I know this is less LSP's fault).
Not to dismiss the mountain of work people have put into it, but it feels very hacked together and clunky rather than a shining achievement.
Re:Ask HN: What's the best source code you've read?
by tuukkah on Sunday September 11, 2022 @03:56AM
(#32797674)
Case in point, Microsoft develops an editor (VSCode) and LSP so that N*M language integrations wouldn't be necessary. But in the development of their language (TypeScript), LSP support is not a priority (in part because LSP is inadequate in its current form): https://github.com/microsoft/TypeScript/issues/39459
Re:Ask HN: What's the best source code you've read?
by codethief on Sunday September 11, 2022 @07:57AM
(#32798874)
> We're working on this, albeit slowly. tsserver's implementation predates LSP so it's nontrivial work to move forward in a way that doesn't adversely affect old clients or result in code duplication.
Re:Ask HN: What's the best source code you've read?
by tuukkah on Sunday September 11, 2022 @10:03AM
(#32799702)
Good to hear you're still committed. By "not a priority" I mean we have been waiting since this was published back in 2016: "[LSP] also means any developer can have a consistent editing experience for their favorite programming language on any tool – even if that tool isn’t VS Code." https://code.visualstudio.com/blogs/2016/06/27/common-langua...
The original bug against Typescript was opened in 2016 as well: https://github.com/microsoft/TypeScript/issues/11274
A simple syntax like noweb and a LSP dispatcher which only handles the noweb syntax elements and dispatches both text and code chunks to respective back ends; the LP LSP Server tangles the code chunks and presents the tangled code to the code specific LSP servers and does the mapping forth and back of the position-in-nw vs position-in-$code while passing all other communication through.
especially now that we have DAP something like this would really make sense, wouldn't it?