Skip to content

Commit

Permalink
fix: remove go to definition functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
uxkjaer committed Oct 12, 2022
1 parent ad36c12 commit 37f9155
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,46 +111,6 @@ connection.onInitialized(async () => {
}
});

connection.onDefinition(async (params: DefinitionParams) => {
const documentUri = params.textDocument.uri;
const document = documents.get(documentUri);
if (document) {
const documentPath = URI.parse(documentUri).fsPath;
const minUI5Version = getMinUI5VersionForXMLFile(documentPath);
const framework = getUI5FrameworkForXMLFile(documentPath);
const model = await getSemanticModel(
initializationOptions?.modelCachePath,
framework,
minUI5Version
);

const ui5Url = getCDNBaseUrl(framework, model.version);

getLogger().debug("`onDefinition` event", {
url: ui5Url,
});

// const documentUri = params.textDocument.uri;
// const document = documents.get(documentUri);
// if (document) {
// const documentPath = URI.parse(documentUri).fsPath;
// const minUI5Version = getMinUI5VersionForXMLFile(documentPath);
// const framework = getUI5FrameworkForXMLFile(documentPath);
// const model = await getSemanticModel(
// initializationOptions?.modelCachePath,
// framework,
// minUI5Version
// );
// const ui5Url = getCDNBaseUrl(framework, model.version)

// }
connection.sendNotification("UI5LanguageAssistant/ui5Definition", {
url: ui5Url,
});
}
return null;
});

connection.onCompletion(
async (
textDocumentPosition: TextDocumentPositionParams
Expand Down

0 comments on commit 37f9155

Please sign in to comment.