Document.getLanguageId

Returns the language ID or guesses it given the filename's extension. Returns null if none is set and can't be guessed.

Guessing Map: * .d|.di = "d" * .dpp = "dpp" * .c = "c" * .cpp = "cpp" * .ds|.dscript = "dscript" * .dml = "dml" * .sdl = "sdl" * .dt = "diet" * .json = "json"

struct Document
const @property @trusted @nogc nothrow
string
getLanguageId
()

Examples

Document d;
assert(d.getLanguageId == null);
d.uri = "file:///home/project/app.d";
assert(d.getLanguageId == "d");
d.languageId = "cpp";
assert(d.getLanguageId == "cpp");

Meta