Closed pinuke closed 2 years ago
@andschwa I'm currently working on a script that acts as a manual controller for the service. The objective of the script will be to allow end users to manually control the service as well as introduce an opportunity to learn LSP.
My current idea is to setup a basic process and pipe controller, then add functions that allow users to load JSON-RPC messages from files and send them to the server to see what kind of response they get. This also gives the end user the opportunity to learn how to write LSP messages (up to and including the message header), not just how to control PSES
The interface for the controller will have 2 parts. One, a shell like interface that users can enter commands into, and two, a simple scripting engine for automating those commands.
I got the idea from a different project that I'm working on. It's a powershell command palette that minimizes to the system tray on WIndows/Ubuntu.
Here are the referenced projects and their Hackaday counterparts:
Once, I finish writing the controller, I might even request to have it referenced within this project so that users can get a tool to playtest LSP and PSES
I pulled that bit of code from the controller. Thought it would be useful to other people
Problems Solved:
Shell Hang:
Executing pwsh with the original command (the older one on top) from the readme causes shells to hang. Not script or automation friendly.
Poor Doc Readability
The arguments list is also long enough to scroll off the screen on most devices. Spacing them out over an array is a screen-friendly alternative.
PR Summary
Added an automation-friendly powershell script for starting the service that doesn't hang the shell.
PR Context
The original command is long (longer than the width of most device screens), so it's not great in documentation, since it needs to be readable. The old one is being left there, so that users have access to a quick and easy copy-and-paste one-liner.
It also hangs the shell. If you run it from the command line, you have to wait for the process to exit before running anything else. Since some users may want to automate the service from PowerShell itself, it is a better practice to call the command with
Start-Process
instead.