Initialize a single SPL2 Language Server (java process spawned by the extension) and client
Provide language server features such as autocomplete, hover documentation, syntax errors, etc
Use a single language server for multiple documents, this requires a slight trick to keep the language server up-to-date after switching documents which we do by providing a no-op edit to the open file (replace the first character with itself when switching between documents)
Provide support for automatically recovering when connection lost to server
New command to allow the user to forcibly restart the language server if issues are encountered
This PR unlocks the following features:
To see the changes just for the intialization work (there's a separate PR https://github.com/splunk/vscode-extension-splunk/pull/86 for language server install) take a look at this diff, or you can focus on the initializer.ts file: https://github.com/fantavlik/vscode-extension-splunk/compare/spl2-install...fantavlik:vscode-extension-splunk:spl2-initialize
Demo of language server initialization:
Demo of a user restarting the language server via the custom command after a hard failure (killing the process spawned by the extension):