Skip to content

Commit

Permalink
refactor: split lsp and treesitter #2
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Apr 9, 2024
1 parent 7a63eb2 commit 59d2d99
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/semantic-lsp/JavaSemanticLsp.ts
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.");
}
}
8 changes: 8 additions & 0 deletions src/semantic-lsp/SemanticLsp.ts
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.

0 comments on commit 59d2d99

Please sign in to comment.