import toml = require ( "toml" ) ; import vscode = require ( "vscode" ) ; import { TextDecoder } from "util" ; export interface DjangoSnippet { prefix : string ; body : string ; detail : string ; description : string ; } export class SnippetProvider { constructor ( private extensionUri ) { } async readSnippets ( name ) { const location = vscode . Uri . joinPath ( this . extensionUri , 'completions/snippets' , name ) ; const buffer = await vscode . workspace . fs . readFile ( location ) ; const str = new TextDecoder ( "utf-8" ) . decode ( buffer ) ; return toml . parse ( str ) . snippets ; } } export async function postInitHook ( ) { }