How to use the lsif-protocol.EdgeLabels.textDocument_hover function in lsif-protocol

To help you get started, we’ve selected a few lsif-protocol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / lsif-node / tsc / src / emitters / graphSON.ts View on Github external
export const create: Create = (writer: Writer, idGenerator: () => Id): Emitter => {
	let vertices: Map;
	const labelMap: Map = new Map([
		[EdgeLabels.item, 'item'],
		[EdgeLabels.contains, 'contains'],
		[EdgeLabels.next, 'next'],
		[EdgeLabels.textDocument_documentSymbol, 'textDocument.documentSymbol'],
		[EdgeLabels.textDocument_foldingRange, 'textDocument.foldingRange'],
		[EdgeLabels.textDocument_diagnostic, 'textDocument.diagnostic'],
		[EdgeLabels.textDocument_documentLink, 'textDocument.documentLink'],
		[EdgeLabels.textDocument_definition, 'textDocument.definition'],
		[EdgeLabels.textDocument_typeDefinition, 'textDocument.typeDefinition'],
		[EdgeLabels.textDocument_hover, 'textDocument.hover'],
		[EdgeLabels.textDocument_references, 'textDocument.references'],
		[EdgeLabels.textDocument_implementation, 'textDocument.implementation'],
	]);
	return {
		start: () => {
			vertices = new Map();
		},
		emit: (element: Vertex | Edge) => {
			if (element.type === ElementTypes.vertex) {
				let gs: GraphSonVertex;
				let values: GraphSonProperty[];
				switch (element.label) {
					case 'project':
						gs = {
							id: element.id,
							label: element.label
github microsoft / vscode-lsif-extension / server / src / json.ts View on Github external
case EdgeLabels.textDocument_foldingRange:
				this.out.foldingRange.set(from.id, to as FoldingRangeResult);
				break;
			case EdgeLabels.textDocument_documentLink:
				this.out.documentLink.set(from.id, to as DocumentLinkResult);
				break;
			case EdgeLabels.textDocument_diagnostic:
				this.out.diagnostic.set(from.id, to as DiagnosticResult);
				break;
			case EdgeLabels.textDocument_definition:
				this.out.definition.set(from.id, to as DefinitionResult);
				break;
			case EdgeLabels.textDocument_typeDefinition:
				this.out.typeDefinition.set(from.id, to as TypeDefinitionResult);
				break;
			case EdgeLabels.textDocument_hover:
				this.out.hover.set(from.id, to as HoverResult);
				break;
			case EdgeLabels.textDocument_references:
				this.out.references.set(from.id, to as ReferenceResult);
				break;
		}
	}
github microsoft / lsif-node / sqlite / src / blobStore.ts View on Github external
case EdgeLabels.next:
					this.handleNextEdge(element);
					break;
				case EdgeLabels.moniker:
					this.handleMonikerEdge(element);
					break;
				case EdgeLabels.textDocument_foldingRange:
					this.handleFoldingRangeEdge(element);
					break;
				case EdgeLabels.textDocument_documentSymbol:
					this.handleDocumentSymbolEdge(element);
					break;
				case EdgeLabels.textDocument_diagnostic:
					this.handleDiagnosticsEdge(element);
					break;
				case EdgeLabels.textDocument_hover:
					this.handleHoverEdge(element);
					break;
				case EdgeLabels.textDocument_declaration:
					this.handleDeclarationEdge(element);
					break;
				case EdgeLabels.textDocument_definition:
					this.handleDefinitionEdge(element);
					break;
				case EdgeLabels.textDocument_references:
					this.handleReferenceEdge(element);
					break;
				case EdgeLabels.item:
					this.handleItemEdge(element);
					break;
				case EdgeLabels.contains:
					this.handleContains(element);
github microsoft / lsif-node / tsc / src / emitters / graphSON.ts View on Github external
export const create: Create = (idGenerator: () => Id): Emitter => {
	let vertices: Map;
	const labelMap: Map = new Map([
		[EdgeLabels.item, 'item'],
		[EdgeLabels.contains, 'contains'],
		[EdgeLabels.refersTo, 'refersTo'],
		[EdgeLabels.textDocument_documentSymbol, 'textDocument.documentSymbol'],
		[EdgeLabels.textDocument_foldingRange, 'textDocument.foldingRange'],
		[EdgeLabels.textDocument_diagnostic, 'textDocument.diagnostic'],
		[EdgeLabels.textDocument_documentLink, 'textDocument.documentLink'],
		[EdgeLabels.textDocument_definition, 'textDocument.definition'],
		[EdgeLabels.textDocument_typeDefinition, 'textDocument.typeDefinition'],
		[EdgeLabels.textDocument_hover, 'textDocument.hover'],
		[EdgeLabels.textDocument_references, 'textDocument.references'],
		[EdgeLabels.textDocument_implementation, 'textDocument.implementation'],
	]);
	return {
		start: () => {
			vertices = new Map();
		},
		emit: (element: Vertex | Edge) => {
			if (element.type === ElementTypes.vertex) {
				let gs: GraphSonVertex;
				let values: GraphSonProperty[];
				switch (element.label) {
					case 'project':
						gs = {
							id: element.id,
							label: element.label