// --- Fully typed methods to overload in derived classes --- /// <summary> /// The initialize method is sent from the client to the server. /// It is send once as the first method after starting up the /// worker.The requests parameter is of type [InitializeParams](#InitializeParams) /// the response if of type [InitializeResult](#InitializeResult) of a Thenable that /// resolves to such. /// </summary> public virtual InitializeResult OnInitialize(InitializeParams parameters) { var capabilities = new ServerCapabilities(); capabilities.textDocumentSync = TextDocumentSyncKind.None; capabilities.hoverProvider = false; capabilities.completionProvider = null; capabilities.signatureHelpProvider = null; capabilities.definitionProvider = false; capabilities.referencesProvider = false; capabilities.documentHighlightProvider = false; capabilities.documentSymbolProvider = false; capabilities.workspaceSymbolProvider = false; capabilities.codeActionProvider = false; capabilities.codeLensProvider = null; capabilities.documentFormattingProvider = false; capabilities.documentRangeFormattingProvider = false; capabilities.documentOnTypeFormattingProvider = null; capabilities.renameProvider = false; var result = new InitializeResult(); result.capabilities = capabilities; return(result); }
public override InitializeResult OnInitialize(InitializeParams parameters) { // Initialize the workspace // TO DO : receive all these configuration properties from the client var rootDirectory = new DirectoryInfo(parameters.rootPath); string workspaceName = rootDirectory.Name + "#" + parameters.processId; typeCobolWorkspace = new Workspace(workspaceName, rootDirectory.FullName, new string[] { "*.cbl", "*.pgm", "*.cpy", "*.txt", }, Encoding.GetEncoding("iso-8859-1"), EndOfLineDelimiter.CrLfCharacters, 80, ColumnsLayout.CobolReferenceFormat, new TypeCobolOptions()); // DEBUG information RemoteWindow.ShowInformationMessage("TypeCobol language server was launched !"); // Return language server capabilities var initializeResult = base.OnInitialize(parameters); initializeResult.capabilities.textDocumentSync = TextDocumentSyncKind.Incremental; initializeResult.capabilities.hoverProvider = true; return initializeResult; }
// --- Fully typed methods to overload in derived classes --- /// <summary> /// The initialize method is sent from the client to the server. /// It is send once as the first method after starting up the /// worker.The requests parameter is of type [InitializeParams](#InitializeParams) /// the response if of type [InitializeResult](#InitializeResult) of a Thenable that /// resolves to such. /// </summary> public virtual InitializeResult OnInitialize(InitializeParams parameters) { var capabilities = new ServerCapabilities(); capabilities.textDocumentSync = TextDocumentSyncKind.None; capabilities.hoverProvider = false; capabilities.completionProvider = null; capabilities.signatureHelpProvider = null; capabilities.definitionProvider = false; capabilities.referencesProvider = false; capabilities.documentHighlightProvider = false; capabilities.documentSymbolProvider = false; capabilities.workspaceSymbolProvider = false; capabilities.codeActionProvider = false; capabilities.codeLensProvider = null; capabilities.documentFormattingProvider = false; capabilities.documentRangeFormattingProvider = false; capabilities.documentOnTypeFormattingProvider = null; capabilities.renameProvider = false; var result = new InitializeResult(); result.capabilities = capabilities; return result; }