Tuesday April 12th, 2022 NCLUG Meeting
Paul Hummer
paul at eventuallyanyway.com
Wed Apr 13 16:48:39 MDT 2022
On Tue, Apr 12, 2022, at 7:52 PM, Bob Proulx wrote:
> j dewitt wrote:
>> What: Tuesday April 12th, 2022 NCLUG Meeting
>
> And various discussion of the VS Code IDE. And how sometimes things
> are annoying when the IDE reacts immediately. For example the IDE
> wants everything constructed correctly all of the time. If you try to
> add code that calls a new function and haven't added the function yet
> then it complains that that the function doesn't exist. Well not yet
> as the construction is in progress and continuing. It's a different
> mindset.
Depending on the language support plugin, this is likely because of the LSP[1] server that implements the language itself. The Flux LSP implementation[2], for instance, has a few options when it finds an unknown identifier, all of them presented as "code actions"[3]. If the identifier matches a package name, it might suggest its import. If the identifier looks like it's a function, it may suggest creating the function based on the signature you just created. Obviously, programming languages are how we tell the computer what to do, not what we want it do, but there are certainly ways to bridge that gap a little better. I recently wrote a flux-lsp POC that walked a user through their first flux query, all implemented in the LSP side, so any editor that has a LSP client could take advantage of it.
I've seen ways that you can tune the LSP client in VS Code, the Monaco editor[4], to be less chatty and send less frequent messages, but that seems much less helpful than building a bulletproof LSP server to implement language support.
Cheers,
Paul
[1] https://microsoft.github.io/language-server-protocol/specification
[2] https://github.com/influxdata/flux-lsp
[3] https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction
[4] https://microsoft.github.io/monaco-editor/
More information about the NCLUG
mailing list