Buffer.setLanguage

void setLanguage(gtksource.language.Language language = null)

Associates a #GtkSourceLanguage with the buffer.

Note that a #GtkSourceLanguage affects not only the syntax highlighting, but also the [context classes][context-classes]. If you want to disable just the syntax highlighting, see [gtksource.buffer.Buffer.setHighlightSyntax].

The buffer holds a reference to language.

Parameters

languagea #GtkSourceLanguage to set, or null.