From b0c0897bd9f4474c18e1c4b1d70dc6384e3e6c4d Mon Sep 17 00:00:00 2001 From: bugarela Date: Wed, 16 Aug 2023 08:31:27 -0300 Subject: [PATCH] Update calls from the plugin --- vscode/quint-vscode/server/src/definitions.ts | 4 ++-- vscode/quint-vscode/server/src/documentSymbols.ts | 2 +- vscode/quint-vscode/server/src/hover.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vscode/quint-vscode/server/src/definitions.ts b/vscode/quint-vscode/server/src/definitions.ts index cc1d3659d..05d9eb1e0 100644 --- a/vscode/quint-vscode/server/src/definitions.ts +++ b/vscode/quint-vscode/server/src/definitions.ts @@ -26,13 +26,13 @@ export function findDefinition( // Find definition of name const def = table.get(id) - if (!def || !def.reference) { + if (!def) { return { nameId: id, name } } return { nameId: id, name, - definitionId: def?.reference, + definitionId: def.id, } } diff --git a/vscode/quint-vscode/server/src/documentSymbols.ts b/vscode/quint-vscode/server/src/documentSymbols.ts index c338334eb..686862dd7 100644 --- a/vscode/quint-vscode/server/src/documentSymbols.ts +++ b/vscode/quint-vscode/server/src/documentSymbols.ts @@ -38,7 +38,7 @@ function symbolKind(def: QuintOpDef | QuintConst | QuintVar): SymbolKind { * Return the def symbols defined in a module */ function getDefs(module: QuintModule, sourceMap: Map): DocumentSymbol[] { - return module.defs.reduce((symbols, def) => { + return module.declarations.reduce((symbols, def) => { // skip certain kinds of defs if ( def.kind === 'assume' || diff --git a/vscode/quint-vscode/server/src/hover.ts b/vscode/quint-vscode/server/src/hover.ts index 965fa0c12..6b2e6fd96 100644 --- a/vscode/quint-vscode/server/src/hover.ts +++ b/vscode/quint-vscode/server/src/hover.ts @@ -11,7 +11,7 @@ import { findDefinitionWithId, findExpressionWithId, format, - prettyQuintDef, + prettyQuintDeclaration, prettyTypeScheme, qualifierToString, } from '@informalsystems/quint' @@ -92,7 +92,7 @@ function inferredDataHover( } const text = def - ? format(lineLength, 0, prettyQuintDef(def, false, result)) + ? format(lineLength, 0, prettyQuintDeclaration(def, false, result)) : expressionToShow(expr!, parsedData.modules, link, document, loc, result) if (!text) {