diff --git a/browser/src/Plugins/Api/Oni.ts b/browser/src/Plugins/Api/Oni.ts index 282605f6db..d90b3bd379 100644 --- a/browser/src/Plugins/Api/Oni.ts +++ b/browser/src/Plugins/Api/Oni.ts @@ -10,7 +10,7 @@ import { Editor } from "./Editor" import { StatusBar } from "./StatusBar" import { DebouncedLanguageService } from "./DebouncedLanguageService" -import { InitializationParamsCreator, LanguageClient, ServerRunOptions } from "./LanguageClient/LanguageClient" +import { InitializationParamsCreator, LanguageClient } from "./LanguageClient/LanguageClient" import { Services } from "./Services" import { Ui } from "./Ui" @@ -87,8 +87,8 @@ export class Oni extends EventEmitter implements Oni.Plugin.Api { }) } - public createLanguageClient(startOptions: ServerRunOptions, initializationParamsCreator: InitializationParamsCreator): LanguageClient { - return new LanguageClient(startOptions, initializationParamsCreator, this) + public createLanguageClient(initializationCommand: string, initializationParamsCreator: InitializationParamsCreator): LanguageClient { + return new LanguageClient(initializationCommand, initializationParamsCreator, this) } public registerLanguageService(languageService: Oni.Plugin.LanguageService): void { diff --git a/browser/src/UI/components/AutoCompletion.tsx b/browser/src/UI/components/AutoCompletion.tsx index c4482146b8..7d447c9f5f 100644 --- a/browser/src/UI/components/AutoCompletion.tsx +++ b/browser/src/UI/components/AutoCompletion.tsx @@ -31,7 +31,7 @@ export class AutoCompletion extends React.Component return null } - const containerStyle: React.CSSProperties = { + const containerStyle = { position: "absolute", top: this.props.y.toString() + "px", left: this.props.x.toString() + "px", diff --git a/browser/src/UI/components/BufferScrollBar.tsx b/browser/src/UI/components/BufferScrollBar.tsx index 98b91bb16c..7c491153af 100644 --- a/browser/src/UI/components/BufferScrollBar.tsx +++ b/browser/src/UI/components/BufferScrollBar.tsx @@ -39,7 +39,7 @@ export class BufferScrollBar extends React.PureComponent { const width = isNormalMode ? this.props.width : this.props.width / 4 const characterToShow = isNormalMode ? this.props.character : "" - const cursorStyle: React.CSSProperties = { + const cursorStyle = { position: "absolute", left: this.props.x.toString() + "px", top: this.props.y.toString() + "px", diff --git a/browser/src/UI/components/CursorLine.tsx b/browser/src/UI/components/CursorLine.tsx index fae6cbb409..de7c9d50df 100644 --- a/browser/src/UI/components/CursorLine.tsx +++ b/browser/src/UI/components/CursorLine.tsx @@ -28,7 +28,7 @@ class CursorLineRenderer extends React.Component const width = this.props.width - const cursorStyle: React.CSSProperties = { + const cursorStyle = { position: "absolute", left: this.props.x.toString() + "px", // Window Start top: this.props.y.toString() + "px", // Same as cursor diff --git a/browser/src/UI/components/LiveEvalMarker.tsx b/browser/src/UI/components/LiveEvalMarker.tsx index 835549b6aa..1ef9bed308 100644 --- a/browser/src/UI/components/LiveEvalMarker.tsx +++ b/browser/src/UI/components/LiveEvalMarker.tsx @@ -49,7 +49,7 @@ export class LiveEvalMarker extends React.Component const cssClasses = classNames("live-eval-marker", { "evaluating": this._isEvaluating() }, { "error": this._hasError() }) - const positionDivStyles: React.CSSProperties = { + const positionDivStyles = { position: "absolute", top: this.props.y.toString() + "px", right: "0px", diff --git a/browser/src/UI/components/Logs.tsx b/browser/src/UI/components/Logs.tsx index ef0402b9cb..d7292d2f71 100644 --- a/browser/src/UI/components/Logs.tsx +++ b/browser/src/UI/components/Logs.tsx @@ -26,7 +26,7 @@ export class LogsRenderer extends React.Component { // TODO copy details to clipboard if (!this.props.visible) { return null } - const maxHeightStyle: React.CSSProperties = { + const maxHeightStyle = { "height": "25vh", "maxHeight": "25vh", "overflow": "auto", diff --git a/browser/src/UI/components/QuickInfo.tsx b/browser/src/UI/components/QuickInfo.tsx index 6edc7e9670..cae2b936b3 100644 --- a/browser/src/UI/components/QuickInfo.tsx +++ b/browser/src/UI/components/QuickInfo.tsx @@ -24,29 +24,29 @@ export class QuickInfo extends React.Component { const openFromTop = this.props.openFromTop || false - const containerStyle: React.CSSProperties = { + const containerStyle = { position: "absolute", top: this.props.y.toString() + "px", left: this.props.x.toString() + "px", } - const innerCommonStyle: React.CSSProperties = { + const innerCommonStyle = { "position": "absolute", "opacity": this.props.visible ? 1 : 0, "max-width": (document.body.offsetWidth - this.props.x - 40) + "px", } - const openFromTopStyle: React.CSSProperties = { + const openFromTopStyle = { ...innerCommonStyle, "top": "0px", } - const openFromBottomStyle: React.CSSProperties = { + const openFromBottomStyle = { ...innerCommonStyle, "bottom": "0px", } - const innerStyle: React.CSSProperties = openFromTop ? openFromTopStyle : openFromBottomStyle + const innerStyle = openFromTop ? openFromTopStyle : openFromBottomStyle return
diff --git a/browser/src/neovim/NeovimInstance.ts b/browser/src/neovim/NeovimInstance.ts index efe57059e7..bad9149fba 100644 --- a/browser/src/neovim/NeovimInstance.ts +++ b/browser/src/neovim/NeovimInstance.ts @@ -228,11 +228,11 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance { return this._neovim.request("nvim_eval", [expression]) } - public command(command: string): Promise { + public command(command: string): Promise { return this._neovim.request("nvim_command", [command]) } - public callFunction(functionName: string, args: any[]): Promise { + public callFunction(functionName: string, args: any[]): Promise { return this._neovim.request("nvim_call_function", [functionName, args]) } diff --git a/definitions/Oni.d.ts b/definitions/Oni.d.ts index aaccebff4b..5cf153349a 100644 --- a/definitions/Oni.d.ts +++ b/definitions/Oni.d.ts @@ -151,7 +151,7 @@ declare namespace Oni { editor: Editor statusBar: StatusBar - registerLanguageService(languageService: LanguageService) + registerLanguageService(languageType: string, languageService: LanguageService) clearHighlights(file: string, key: string) setHighlights(file: string, key: string, highlights: SyntaxHighlight[]) diff --git a/package.json b/package.json index f0d6b14ffa..b547ac89d4 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "omnisharp-client": "7.0.6", "q": "1.4.1", "tslint": "4.0.2", - "typescript": "2.4.1" + "typescript": "2.2.1" }, "devDependencies": { "@types/classnames": "0.0.32", @@ -116,7 +116,7 @@ "@types/msgpack-lite": "0.1.4", "@types/node": "6.0.48", "@types/q": "0.0.32", - "@types/react": "15.0.30", + "@types/react": "0.14.48", "@types/react-dom": "0.14.18", "@types/react-redux": "4.4.38", "@types/sinon": "1.16.32", @@ -152,7 +152,7 @@ "sinon": "1.17.6", "spectron": "3.6.2", "style-loader": "0.13.1", - "ts-loader": "2.2.2", + "ts-loader": "1.2.2", "vscode-jsonrpc": "3.3.1", "vscode-languageserver-types": "3.3.0", "wcwidth": "1.0.1",