import * as vscode from "vscode" ; const data = require ( "../data/cvar" ) . data ; const ConsoleCategory = [ "Debug" , "Graphics" , "Console" , "Combat" , "Game" , "Default" , "Net" , "Sound" , "Gm" , "Reveal" , "None" , ] ; function getMarkdown ( name ) { let cvar = data [ name ] ; let s = "**CVar**" ; if ( cvar . help ) s += " - " + cvar . help ; s += "\n" ; if ( cvar . default ) s += "* ```\nDefault: " + cvar . default + "\n```\n" ; if ( cvar . category != 5 ) s += "* ```\nCategory: " + ConsoleCategory [ cvar . category ] + "\n```\n" ; if ( cvar . scope ) s += "* ```\nScope: " + cvar . scope + "\n```\n" ; let doc = `\n[GitHub](https://github.com/Gethe/wow-ui-source/search?q=${ cvar . name })` ; return s + doc ; } export function getHover ( name ) { let md = new vscode . MarkdownString ( getMarkdown ( name ) ) ; let item = new vscode . Hover ( md ) ; return item ; }