Rust executor in kcl lsp server (just rust side for now) (#2103)

* start of cleaning up executor

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup executor

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* do nothing if the file does not change

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* execution is lsp

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* add the custom notifications

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* custom notifications

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix spawn local

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update derive-docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* ckeanups

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* emptu

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2024-04-12 21:32:57 -07:00
committed by GitHub
parent 9dedc56b7e
commit 70bc0accad
35 changed files with 811 additions and 457 deletions

View File

@ -21,9 +21,12 @@ interface LSPRequestMap {
LSP.SemanticTokensParams,
LSP.SemanticTokens
]
getCompletions: [CopilotLspCompletionParams, CopilotCompletionResponse]
notifyAccepted: [CopilotAcceptCompletionParams, any]
notifyRejected: [CopilotRejectCompletionParams, any]
'copilot/getCompletions': [
CopilotLspCompletionParams,
CopilotCompletionResponse
]
'copilot/notifyAccepted': [CopilotAcceptCompletionParams, any]
'copilot/notifyRejected': [CopilotRejectCompletionParams, any]
}
// Client to server
@ -215,7 +218,7 @@ export class LanguageServerClient {
}
async getCompletion(params: CopilotLspCompletionParams) {
const response = await this.request('getCompletions', params)
const response = await this.request('copilot/getCompletions', params)
//
this.queuedUids = [...response.completions.map((c) => c.uuid)]
return response
@ -235,11 +238,11 @@ export class LanguageServerClient {
}
async acceptCompletion(params: CopilotAcceptCompletionParams) {
return await this.request('notifyAccepted', params)
return await this.request('copilot/notifyAccepted', params)
}
async rejectCompletions(params: CopilotRejectCompletionParams) {
return await this.request('notifyRejected', params)
return await this.request('copilot/notifyRejected', params)
}
private processNotifications(notification: LSP.NotificationMessage) {