Very very basic inital checkin to show a way to talk to/from a Vim job using python (mainly), and to parse the sort of messages that LSP and VSCode debugger protocol speak (i.e. similar to http messages). Very hacky, sort of holds together for what it is.
23 lines
418 B
Bash
Executable file
23 lines
418 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
while true; do
|
|
read string
|
|
|
|
if [ "$string" = "GOODBYE" ]; then
|
|
exit 0
|
|
elif [ "$string" = "FAIL" ]; then
|
|
echo "There was a faytal eyror" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Content-Type: Something"
|
|
echo "Content-Length: ${#string}"
|
|
echo ""
|
|
echo $string
|
|
|
|
string="Special message"
|
|
echo "Content-Type: Something-else"
|
|
echo "Content-Length: ${#string}"
|
|
echo ""
|
|
echo $string
|
|
done
|