mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
LSP: initial LSP implementation for IR files to assist with decompilation (#1647)
* lsp: json-rpc example is working, a decent place to start... * lsp: vendor library * lsp: cleanup and time to get started * lsp: commit what i got so far * lsp: example `initialize` payload * lsp: switch to `stdio` * stash * modularize the lsp implementation * lsp: implement first actual LSP feature - function names in outline * lsp: produce document diagnostics * lsp: remove unused third-party lib * lsp: support hovering MIPS instructions in IR files * lsp: basic go-to all-types definition * stash * lsp: cleanup code, just need to add it to the release artifacts * fix some project configuration * fix linux build * lsp: add lsp to PR artifacts and release assets * lsp: address feedback
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#include "document_synchronization.h"
|
||||
|
||||
void LSPSpec::to_json(json& j, const DidOpenTextDocumentParams& obj) {
|
||||
j = json{{"textDocument", obj.m_textDocument}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, DidOpenTextDocumentParams& obj) {
|
||||
j.at("textDocument").get_to(obj.m_textDocument);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const TextDocumentContentChangeEvent& obj) {
|
||||
j = json{{"text", obj.m_text}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, TextDocumentContentChangeEvent& obj) {
|
||||
j.at("text").get_to(obj.m_text);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const DidChangeTextDocumentParams& obj) {
|
||||
j = json{{"textDocument", obj.m_textDocument}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, DidChangeTextDocumentParams& obj) {
|
||||
j.at("textDocument").get_to(obj.m_textDocument);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const DidCloseTextDocumentParams& obj) {
|
||||
j = json{{"textDocument", obj.m_textDocument}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, DidCloseTextDocumentParams& obj) {
|
||||
j.at("textDocument").get_to(obj.m_textDocument);
|
||||
}
|
||||
Reference in New Issue
Block a user