-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split lsp and treesitter #2
- Loading branch information
Showing
16 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { LanguageClient } from "vscode-languageclient/node"; | ||
import { AutoDevContext } from "../autodev-context"; | ||
import { extensions } from "vscode"; | ||
import { SemanticLsp } from './SemanticLsp'; | ||
|
||
export class JavaSemanticLsp implements SemanticLsp { | ||
context: AutoDevContext; | ||
constructor(context: AutoDevContext) { | ||
this.context = context; | ||
} | ||
|
||
isActive() { | ||
return true; | ||
} | ||
|
||
startClient(language: String) : LanguageClient | undefined { | ||
let java = extensions.getExtension("redhat.java"); | ||
if (!java) { | ||
return undefined; | ||
} | ||
|
||
// todo: spike integration with java language server; | ||
} | ||
|
||
makeRequest(method: string, param: any): Promise<any> { | ||
throw new Error("Method not implemented."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { SupportedLanguage } from "../language/supported"; | ||
import { LanguageClient } from "vscode-languageclient/node"; | ||
|
||
export interface SemanticLsp { | ||
isActive(): boolean; | ||
startClient(language: String) : LanguageClient | undefined; | ||
/* async */ makeRequest(method: string, param: any): Promise<any>; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.