I have done something similiar but on web. Using the intelephense language server in the backend ( which I connect using web socket )
and @codingame/monaco-languageclient , @codingame/monaco-jsonrpc in the frontend as shown in this answer