Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
st-vi committed Oct 19, 2023
1 parent 5d3f138 commit 83533c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions WebSocketClient/UVLPlayground/src/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
port: 30000,
languageServerHostName: '590c9306-8ced-48f6-85f2-bb8caa1bfd52.ul.bw-cloud-instance.org',
};
6 changes: 2 additions & 4 deletions WebSocketClient/UVLPlayground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { CloseAction, ErrorAction, MessageTransports } from 'vscode-languageclie
import { WebSocketMessageReader, WebSocketMessageWriter, toSocket } from 'vscode-ws-jsonrpc';
import { RegisteredFileSystemProvider, registerFileSystemOverlay, RegisteredMemoryFile } from 'vscode/service-override/files';
import { Uri } from 'vscode';
import config from './config.js';
//import { createUrl } from '../../common.js';

import { buildWorkerDefinition } from 'monaco-editor-workers';
Expand Down Expand Up @@ -142,10 +143,7 @@ export const startPythonClient = async () => {
registerFileSystemOverlay(1, fileSystemProvider);

// create the web socket and configure to start the language client on open, can add extra parameters to the url if needed.
createWebSocket(createUrl(
process.env.UVLS_HOST_NAME === undefined ? '590c9306-8ced-48f6-85f2-bb8caa1bfd52.ul.bw-cloud-instance.org' : process.env.UVLS_HOST_NAME,
process.env.PORT === undefined ? 30000 : parseInt(process.env.PORT),
'/pyright', {
createWebSocket(createUrl(config.languageServerHostName,config.port,'/pyright', {
// Used to parse an auth token or additional parameters such as import IDs to the language server
authorization: 'UserAuth'
// By commenting above line out and commenting below line in, connection to language server will be denied.
Expand Down

0 comments on commit 83533c5

Please sign in to comment.